CLI install on Linux Mint 19.3

I tried installing the CLI, but failed.
On my desktop I already have Joplin 1.3.18 working.
I was not sure if it is the right one, but installed this:

`curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -`

Why I did this is because the FAQ says:
Important: First, install Node 10+.

Did I interpret wrongly that Node 10 is the same as setup_10.x perhaps?
Because when I pasted this in the terminal:

sudo apt-get install -y nodejs

Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version (8.16.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and then the next command, it went haywire:

 NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
/home/ludo/.joplin-bin/bin/joplin -> /home/ludo/.joplin-bin/lib/node_modules/joplin/main.js

sqlite3@4.2.0 install /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[sqlite3] Success: "/home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sqlite3/lib/binding/node-v57-linux-x64/node_sqlite3.node" is installed via remote

keytar@7.1.0 install /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/keytar
prebuild-install || node-gyp rebuild

sharp@0.26.3 install /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

ERR! sharp Expected Node.js version >=10 but found 8.16.1
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see sharp - High performance Node.js image processing for required dependencies
make: Entering directory '/home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sharp/build'
CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
AR(target) Release/obj.target/../node-addon-api/nothing.a
COPY Release/nothing.a
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:24:10: fatal error: vips/vips8: No such file or directory
#include <vips/vips8>
^~~~~~~~~~~~
compilation terminated.
sharp.target.mk:129: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory '/home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-124-lowlatency
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sharp
gyp ERR! node -v v8.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/joplin/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN babel-eslint@10.1.0 requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN jsdom@15.2.1 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.4.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.4.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.26.3 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.26.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ludo/.npm/_logs/2020-11-19T09_18_45_323Z-debug.log

Sorry BTW if I didn't get the conventions for pasting terminal output 100% right.

nodejs install for package manager: https://nodejs.org/en/download/package-manager/

Yes, that's the way I went and picked
Debian and Ubuntu based Linux distributions
and then followed the link all the way up to the
Installation instructions
which resulted in the above problem.

Obviously, you have nodejs 8 installed, and at least nodejs 10 is required
Try

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
1 Like

ok, so I tried:

curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -

and then again had this:

sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (8.16.1-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and
NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
gave me all the warnings / errors again

First uninstall nodejs v8 on the system

Then install nodejs v10 instead of v15

it seemed to go well, but
NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin

gave me
bash: /usr/bin/npm: No such file or directory

Make sure you have successfully installed nodejs

node --version

I purged and autoremoved and again went with
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

and installed again but still see
node --version
v8.10.0

I went through the procedures once more and somehow must've done something different, because now I have the right version v10.23.0, but I still get a lot of warnings:

NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
/home/ludo/.joplin-bin/bin/joplin -> /home/ludo/.joplin-bin/lib/node_modules/joplin/main.js

sqlite3@4.2.0 install /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
[sqlite3] Success: "/home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" is installed via remote

keytar@7.2.0 install /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/keytar
prebuild-install || npm run build

sharp@0.26.3 install /home/ludo/.joplin-bin/lib/node_modules/joplin/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.0/libvips-8.10.0-linux-x64.tar.br
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/joplin/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN babel-eslint@10.1.0 requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN jsdom@15.2.1 requires a peer of canvas@^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.4.0 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@7.4.0 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

  • joplin@1.4.3
    added 580 packages from 818 contributors in 34.865s

┌────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/ludo/.config

Trying that same command with sudo, as the output suggested, still gives 11 warnings.
However, I can start Joplin in terminal - is this right?

In the past I also had problems building Joplin on Linux Mint 19.3. I could solve them by

sudo apt install g++ libsecret-1-dev libgconf-2-4 
npm install -g node-gyp

Not sure if all packages were needed but at least it worked. However haven't tested this with the newest Joplin version.

1 Like
sudo apt install g++ libsecret-1-dev libgconf-2-4

went smooth, but the 2nd command gave many errors and it was suggested to try again as root.
This narrowed down the amount of warnings to 2:

sudo npm install -g node-gyp

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/usr/bin/node-gyp -> /usr/lib/node_modules/node-gyp/bin/node-gyp.js

  • node-gyp@7.1.2
    added 96 packages from 66 contributors in 2.992s

EDIT: still, starting joplin in terminal works.
Sync was also successful; I found the how-to info on the joplin home page :slight_smile: