I just installed from brew (version 1.0.116_1) and when I try to start (just type joplin) I got the following:
$ joplin
module.js:550
throw err;
^
Error: Cannot find module '/usr/local/Cellar/joplin/1.0.116_1/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/binding/node-v57-darwin-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/Cellar/joplin/1.0.116_1/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
Please try to install via npm. brew is a few versions behind.
FYI: this error has something to do with the node version you are using and which node version was used to create the package. The problem is actually upstream with sqlite3, but I think they might have fixed this already.
I've opened a PR with brew. The new version should be available on brew soon.
The new version is now available via brew.
updated version still broken @tessus
module.js:557
throw err;
^
Error: Cannot find module '/usr/local/Cellar/joplin/1.0.140/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/binding/node-v59-darwin-x64/node_sqlite3.node'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/Cellar/joplin/1.0.140/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3.js:4:15)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
installing via npm doesn't work either
$ NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
module.js:557
throw err;
^
Error: Cannot find module '../lib/utils/unsupported.js'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:152:3)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
Ok, here are my settings in .bash_profile:
export NODEJS_HOME=/usr/local/lib/nodejs/node-v10.15.3/bin
export NODEJS_GLOBAL_HOME=$HOME/.npm-global/bin
export PATH=~/bin:/opt/local/bin:/opt/local/sbin:$NODEJS_GLOBAL_HOME:$NODEJS_HOME:$PATH
My .npmrc:
prefix=/Users/tessus/.npm-global
npm install joplin -g works and I do not get any errors when starting joplin. I just uninstalled and installed again. All good.
I really do not understand the error you are seeing.
@laurent22 have you seen above error? I'm not sure how to help.
@masukomi could you try to run the following in ~/.joplin-bin/lib/node_modules/joplin:
npm rebuild --build-from-source sqlite3
./node_modules/.bin/electron-rebuild
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "backlog" and I will leave it open. Thank you for your contributions.
I'm experiencing the same issue now
Solved as mentioned by @tessus, I was using an outdated node version for local needs.
Using the latest node version seems to solve the issue.
I was also running into this issue, which was solved by explicitly installing via npm with node v10 (my global was V8 which has an EOL coming up at the end of the month).
I noticed that the CLI has a dependency of "node": ">=8.7.0". Perhaps that should be 10 now? I can take a swing at it if that seems reasonable.
@joeltaylor, you got this error with Node 8 but not 10? If that so, I guess the app is indeed no longer compatible with node 8 and we should indeed update the dependency.
@laurent22 yup! I'll open a PR to update the dependency.
Thanks, could you also update the readme please (where it says to install Node 8)?
Yeah, I'll make a pass to ensure that's all up to date.
I experienced the same issue but I have a data point that is different: I’m using a current (v14) version of node but I installed it on a Raspberry Pi so perhaps the rebuild of sqlite needs to happen in order to compile for the ARM architecture 🤷 Anyway, this worked great https://github.com/laurent22/joplin/issues/1107#issuecomment-506842948 Thanks
Most helpful comment
@laurent22 have you seen above error? I'm not sure how to help.
@masukomi could you try to run the following in
~/.joplin-bin/lib/node_modules/joplin: