I just installed joplin using brew install joplin in order to evaluate.
After a succesful install, I tried starting joplin:
$ joplin --help
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module '/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/binding/node-v72-darwin-x64/node_sqlite3.node'
Require stack:
- /usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3-binding.js
- /usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3.js
- /usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/lib/database-driver-node.js
- /usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/lib/BaseApplication.js
- /usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/app.js
- /usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/main.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3-binding.js',
'/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/node_modules/sqlite3/lib/sqlite3.js',
'/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/lib/database-driver-node.js',
'/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/lib/BaseApplication.js',
'/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/app.js',
'/usr/local/Cellar/joplin/1.0.164/libexec/lib/node_modules/joplin/main.js'
]
}
The 'fix' was rather simple:
Despite an easy fix, this is probably not something that should happen after a fresh install.
Installing on Arch Linux gives a similar error:
internal/modules/cjs/loader.js:1088
throw err;
^
Error: Cannot find module 'immer'
Require stack:
- /usr/share/joplin-cli/lib/services/ResourceEditWatcher/reducer.js
- /usr/share/joplin-cli/lib/reducer.js
- /usr/share/joplin-cli/lib/BaseApplication.js
- /usr/share/joplin-cli/app.js
- /usr/share/joplin-cli/main.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1085:15)
at Function.Module._load (internal/modules/cjs/loader.js:928:27)
at Module.require (internal/modules/cjs/loader.js:1145:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/usr/share/joplin-cli/lib/services/ResourceEditWatcher/reducer.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:1256:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)
at Module.load (internal/modules/cjs/loader.js:1105:32)
at Function.Module._load (internal/modules/cjs/loader.js:967:14)
at Module.require (internal/modules/cjs/loader.js:1145:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/share/joplin-cli/lib/services/ResourceEditWatcher/reducer.js',
'/usr/share/joplin-cli/lib/reducer.js',
'/usr/share/joplin-cli/lib/BaseApplication.js',
'/usr/share/joplin-cli/app.js',
'/usr/share/joplin-cli/main.js'
]
}
I tried using your fix but with the commands (Since I'm guessing that you're on Mac so our directories are not the same):
cd /usr/share/joplin-cli/node_modules
sudo yarn
Did nothing (I.e. the same error message). Attempting
cd /usr/share/joplin-cli/node_modules
sudo yarn add immer
gave an error almost exactly like yours:
internal/modules/cjs/loader.js:1088
throw err;
^
Error: Cannot find module '/usr/share/joplin-cli/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node'
Require stack:
- /usr/share/joplin-cli/node_modules/sqlite3/lib/sqlite3-binding.js
- /usr/share/joplin-cli/node_modules/sqlite3/lib/sqlite3.js
- /usr/share/joplin-cli/lib/database-driver-node.js
- /usr/share/joplin-cli/lib/BaseApplication.js
- /usr/share/joplin-cli/app.js
- /usr/share/joplin-cli/main.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1085:15)
at Function.Module._load (internal/modules/cjs/loader.js:928:27)
at Module.require (internal/modules/cjs/loader.js:1145:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/usr/share/joplin-cli/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
at Module._compile (internal/modules/cjs/loader.js:1256:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)
at Module.load (internal/modules/cjs/loader.js:1105:32)
at Function.Module._load (internal/modules/cjs/loader.js:967:14)
at Module.require (internal/modules/cjs/loader.js:1145:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/share/joplin-cli/node_modules/sqlite3/lib/sqlite3-binding.js',
'/usr/share/joplin-cli/node_modules/sqlite3/lib/sqlite3.js',
'/usr/share/joplin-cli/lib/database-driver-node.js',
'/usr/share/joplin-cli/lib/BaseApplication.js',
'/usr/share/joplin-cli/app.js',
'/usr/share/joplin-cli/main.js'
]
}
However, trying
cd /usr/share/joplin-cli
sudo yarn
again brings me back to the first error message. Not sure how to proceed from here.
@loki7990 Try cd'ing to /usr/share/joplin-cli and running sudo npm install immer (or with yarn, yarn add immer [maybe followed by yarn install? I'm not familiar with yarn]); that should install the missing package.
Perfect, that worked! I used your npm approach. Thank you so much
On Mon, Aug 10, 2020 at 11:52 AM Ryan notifications@github.com wrote:
@loki7990 https://github.com/loki7990 Try cd'ing to
/usr/share/joplin-cli and running sudo npm install immer (or with yarn, yarn
add immer [maybe followed by yarn install? I'm not familiar with yarn]);
that should install the missing package.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/laurent22/joplin/issues/3584#issuecomment-671310447,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AN2EVSMK53I45QQRL7UI3GDR77NQZANCNFSM4PQOJ57Q
.
Those cd+ yarn install or npm install are only workarounds that should not be required.
The install should install everything properly.
Running yarn is just like running yarn install or npm install. The fact that it is required means that something did not work properly.
If it helps, I actually got this same message (Arch Linux, missing "immer") after a mere update, not a fresh install.
cd /ush/share/joplin-cli
npm install immer failed, Missing write access to /usr/share/joplin-cli/node_modules
sudo npm install immer worked
Other info:
I've been using Joplin (both CLI and GUI) for years with no issues on Arch and just updating through the package manager. The GUI application (they are bundled together on Arch) still worked fine even when the CLI failed.
on archlinux
cd /usr/share/joplin-cli
sudo npm install immer --unsafe-perm
sudo npm install sqlite3 --unsafe-perm
gui :joplin-desktop
cli: joplin
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 comment on the issue and I will leave it open. Thank you for your contributions.
The problem still persists
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 comment on the issue and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Hi Joplin devs, users report the issue over and over. I don't think we are all dreaming so it would be nice for the stale bot to not react due to the inactivity of the dev.
Did you try? Could you reproduce? Could you not? Do you have questions?
Most helpful comment
The problem still persists