Jazz
14 July 2021 07:37
1
Iβm trying to update Joplin
for some time now, but I always encounter the following issue:
4444 http fetch GET 200 https://registry.npmjs.org/glob-stream 114ms (cache miss)
4445 timing metavuln:packument:glob-stream Completed in 116ms
4446 notice
4446 notice New minor version of npm available! 7.17.0 -> 7.19.1
4446 notice Changelog: https://github.com/npm/cli/releases/tag/v7.19.1
4446 notice Run npm install -g npm@7.19.1 to update!
4446 notice
4447 verbose stack TypeError: semver.simplifyRange is not a function
4447 verbose stack at Advisory.[calculateRange] (/usr/lib/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js:191:16)
4447 verbose stack at Advisory.load (/usr/lib/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js:148:28)
4447 verbose stack at Calculator.[calculate] (/usr/lib/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/index.js:59:14)
4447 verbose stack at async Promise.all (index 8)
4447 verbose stack at async Map.[init] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:180:7)
4447 verbose stack at async Map.run (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js:108:7)
4448 verbose cwd /var/cache/private/pamac/joplin/src/joplin-1.8.5
4449 verbose Linux 5.10.49-1-MANJARO
4450 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--cache" "/var/cache/private/pamac/joplin/src/npm-cache"
4451 verbose node v12.22.0
4452 verbose npm v7.17.0
4453 error semver.simplifyRange is not a function
4454 verbose exit 1
$ npm list -g
/home/jazz/.npm-global/lib
+-- asar@3.0.3
+-- npm@7.19.1
`-- semver@7.3.5
Any help would be appreciated. Thanks!
Jazz
14 July 2021 11:19
2
Iβve learned that npm
should be downgraded to v6
in order to use Joplin
.
How could I do it safely in Manjaro?
In case somebody else experiences problems with building Joplin or running scripts defined in package.json. npm 7.x causes the toolchain to fail. The current fix is to downgrade to the latest 6.x version of npm. Here are issues that have been...
Reading time: 1 mins π
Likes: 2 β€
Instead of using a global installation of node - I recommend using a node version manager.
One such version manager is nvm.
1 Like
Jazz
14 July 2021 14:09
4
Thanks for the heads up. I installed node v14
& npm v6
by using nvm
and switched to it, but the error is still the same.
$ node -v || node --version
v14.17.3
$ npm --version
6.14.13
By looking at the logs, during installation of Joplin, it still mentions the npm v7.17.0-1
which was installed via pamac:
I have noticed thereβs another npm
that I tried to install whilst struggling with Joplin
in my ~/.npm-global
installed with the -g
switch.
I know this may be critical for my system and I kindly ask for your guidance (to avoid bricking my Manjaro) - what would be a clean and safe way to reduce those 2 redundant versions of npm/node
and keep only the one I just installed via nvm
?
Just checking versions:
[pvonbert@frydo bash]$ whereis npm
npm: /usr/bin/npm /usr/share/man/man1/npm.1.gz
npm -v 7.20.0
node -v v16.4.2
npm is this bash script:
#!/usr/bin/env node
require(ββ¦/lib/cli.jsβ)(process)
and my last joplin installation did also:
[2021-07-17T17:12:39-0400] [ALPM] installed joplin-desktop (2.1.7-1)
[2021-07-17T17:03:55-0400] [ALPM] installed jq (1.6-4)
[2021-07-17T17:03:55-0400] [ALPM] installed oniguruma (6.9.7.1-1)
I donβt know if any of this will help you or muddy the waters more
Joplin is in the AUR (Arch User Repository ).
Jazz
18 July 2021 09:45
7
$ whereis npm
npm: /usr/bin/npm /home/jazz/.nvm/versions/node/v14.17.3/bin/npm /usr/share/man/man1/npm.1.gz
$ npm -v
6.14.13
$ node -v
v14.17.3
$ /usr/bin/npm -v
7.17.0
$ /usr/bin/node -v
v12.22.0
$ /usr/bin/npm list --depth=0
joe@ /home/jazz
+-- @mapbox/node-pre-gyp@1.0.1
`-- semver@7.3.5
jq
and oniguruma
installed (same versions)
The only difference is that I have multiple npm
installed: one is my /usr/bin
and the other one in my /home
dir via nvm
. I tried to delete the /home
instance, but there was no improvements. Still the semvers
issue. I guess I should not uninstall the one in /usr/bin
and install it again, since it may be required by the system?
Jazz
18 July 2021 09:50
8
Iβm just trying to decipher why other Manjaro users report they can install Joplin, but I canβt replicate it due to an unknown issue with semver
. Even more confusing is that the devs of Joplin claim it canβt be built against npm v7.x
, whilst others claim they can.
SemVer 7.3.5 and jq version 1.6 installed but not oniguruma
.
$ npm list -g
/usr/lib
βββ node-gyp@8.1.0
βββ nopt@5.0.0
βββ npm@7.20.0
βββ semver@7.3.5
while
$ tree -l -L 2 ~/.npm
/home/pvonbert/.npm
βββ _cacache
β βββ content-v2
β βββ index-v5
β βββ tmp
βββ eresolve-report.txt
βββ _logs
β βββ 2021-07-16T21_11_19_664Z-debug.log
β βββ 2021-07-16T21_12_45_450Z-debug.log
β βββ 2021-07-16T21_14_08_537Z-debug.log
β βββ 2021-07-16T21_21_04_190Z-debug.log
β βββ 2021-07-17T14_33_39_010Z-debug.log
β βββ 2021-07-17T21_19_34_846Z-debug.log
β βββ 2021-07-17T21_20_21_887Z-debug.log
βββ _update-notifier-last-checked
npm -h comments a .npmrc file, which I do not have.
But apart from this, I couldnβt see anything else, sorry Jazz.
Hi Jazz, today there was an update of Joplin to:
Joplin 2.2.1 (prod, linux)
Client ID: 3fcdf7b15183478b9a2342dce86bxxxx
Sync Version: 2
Profile Version: 39
Keychain Supported: No
Revision: bf3f461 (master)
If interested I can send you the output of yay
p
1 Like
Jazz
19 July 2021 21:50
11
Yes, please. I would prefer pamac
(if possible), thank you.
Jazz
20 July 2021 11:19
12
I believe this is my main issue that affects hits, so Iβll open another one here (since the definition of the original problem described on top of this page may be misleading):
I have just encountered a weird issue that I canβt resolve easily. I tried to install npm in multiple ways, and finally ended up using nvm, but now I probably need to find a way to remove the previous βglobal npmβ that Iβve installed via npm install -g npm@_VERSION_. The most confusing thing is the following:
$ which npm
/home/jazz/.nvm/versions/node/v16.5.0/bin/npm
$ npm --version
7.17.0
$ whereis npm
npm: /usr/bin/npm /home/jazz/.nvm/versions/node/v16.5.0/bin/npm /usr/share/man/man1/npm.1.gβ¦
Jazz
21 July 2021 01:51
13
At least one of the following commands helped me to install joplin-desktop
:
$ nvm cache clear
$ nvm exec npm audit fix
$ nvm exec npm install semver
$ pamac install joplin-desktop
I just read your post. Interesting. I mess so much my system that usually I have to clean install it once a year. Maybe thatβs why itβs so different!?
$ which npm
/usr/bin/npm
$ npm --version
7.20.0
$ whereis npm
npm: /usr/bin/npm /usr/share/man/man1/npm.1.gz
$ which node
/usr/bin/node
[$ whereis node
node: /usr/bin/node /usr/include/node /usr/share/man/man1/node.1.gz
And nvm is not installed
$ whereis nvm
nvm:
But at least you got Joplin installed, there is always a way (in Linux)
system
Closed
5 August 2021 16:10
15
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.