Fatal error trying to run joplin cli. Not sure how to troubleshoot this. I ran the install commands on another Mac and it works. I need it to work on this one though.
gotham:~ abosio$ NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm warn deprecated @types/nanoid@3.0.0: This is a stub types definition. nanoid provides its own type definitions, so you do not need this installed.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated gauge@4.0.4: This package is no longer supported.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated highlight.js@9.12.0: Version no longer supported. Upgrade to @latest
npm warn deprecated highlight.js@9.12.0: Version no longer supported. Upgrade to @latest
added 25 packages, removed 35 packages, and changed 757 packages in 31s
98 packages are looking for funding
run `npm fund` for details
npm notice
npm notice New patch version of npm available! 10.8.2 -> 10.8.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3
npm notice To update run: npm install -g npm@10.8.3
npm notice
gotham:~ abosio$ sudo ln -s ~/.joplin-bin/bin/joplin /usr/local/bin/joplin
Password:
ln: /usr/local/bin/joplin: File exists
gotham:~ abosio$ joplin
Fatal error:
[Error: An unknown error occurred.]
What does ls -l ~/.joplin-bin/bin/joplin print, what is this file linked to?
You need to find where "main.js" is, then run it manually using node main.js and see what error message you get, which hopefully will be clearer than the unknown error you're having now
I'm using nvm. I thought the lts v20 would be safer, but I switched to v22 and that seems to have created a new problem.
$ joplin
(node:19413) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Fatal error:
[Error: An unknown error occurred.]
$ node --trace-deprecation main.js
(node:19454) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
at node:punycode:3:9
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
at loadBuiltinModule (node:internal/modules/helpers:108:7)
at Module._load (node:internal/modules/cjs/loader:1099:17)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
at Module.require (node:internal/modules/cjs/loader:1339:12)
at require (node:internal/modules/helpers:135:16)
at Object.<anonymous> (/Users/abosio/.joplin-bin/lib/node_modules/joplin/node_modules/markdown-it/lib/index.js:14:20)
Fatal error:
[Error: An unknown error occurred.]
Same error actually. It's just that node 20 has more useless warnings.
I wonder if there's some node.js log you could check somewhere on your computer about the error? It wouldn't be the Joplin log because the app doesn't even start
I don't think node.js creates any logging other than what is output to the console when running.
My end goal was to have this running on my mac Mini to write an a script to make weekly backups in a few of Joplin's export formats and then have that end up on my Synology where it will also backup to B2. At this point I may set that up on my Raspberry Pi homelab instead, but it does bug me that I can't get it working on the mac Mini. (I already have Joplin CLI working on my Macbook Pro but that is my work laptop, so I don't want the personal stuff there.)