node version: v16.11.0
npm version: 8.0.0
Hi! When trying to build Joplin I get the following error. Any help would be greatly appreciated.
➜ joplin git:(dev) npm install
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Potential vulnerability. Please upgrade to @latest
> postinstall
> npm run bootstrap --no-ci && npm run build
> bootstrap
> lerna bootstrap --force-local --no-ci
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 1 in '@joplin/server'
lerna ERR! npm install stderr:
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (7)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v93-linux-x64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.9.7 found at "/usr/bin/python3"
npm ERR! gyp ERR! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack Error: Cannot find module 'request'
npm ERR! gyp ERR! stack Require stack:
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
npm ERR! gyp ERR! stack - /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
npm ERR! gyp ERR! stack at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR! gyp ERR! stack at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR! gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! stack at require (node:internal/modules/cjs/helpers:102:18)
npm ERR! gyp ERR! stack at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:10:17)
npm ERR! gyp ERR! stack at Module._compile (node:internal/modules/cjs/loader:1101:14)
npm ERR! gyp ERR! stack at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
npm ERR! gyp ERR! stack at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR! gyp ERR! stack at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR! gyp ERR! stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm ERR! gyp ERR! System Linux 5.10.70-1-MANJARO
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.11.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3/lib/binding/node-v93-linux-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (7)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/jefferyl/Projects/joplin/packages/server/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.10.70-1-MANJARO
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/jefferyl/Projects/joplin/packages/server/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/jefferyl/Projects/joplin/packages/server/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.11.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T20_43_29_355Z-debug.log
lerna ERR! npm install exited 1 in '@joplin/server'
lerna WARN complete Waiting for 7 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 1
npm ERR! path /home/jefferyl/Projects/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T20_43_29_533Z-debug.log
Nice, thanks @roman_r_m. That seems to have resolved the node-gyp errors. However, now I'm getting an error that wants me to rename files. I tried moving them as requested, but it still results in a similar error, but with a different file.
➜ joplin git:(dev) ✗ npm install
> postinstall
> npm run bootstrap --no-ci && npm run build
> bootstrap
> lerna bootstrap --force-local --no-ci
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 217 in '@joplin/lib'
lerna ERR! npm install stderr:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals
npm ERR! dest /home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_24_55_923Z-debug.log
lerna ERR! npm install exited 217 in '@joplin/lib'
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 217
npm ERR! path /home/jefferyl/Projects/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_24_56_010Z-debug.log
➜ joplin git:(dev) ✗ npm install
> postinstall
> npm run bootstrap --no-ci && npm run build
> bootstrap
> lerna bootstrap --force-local --no-ci
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Bootstrapping 16 packages
lerna info Installing external dependencies
lerna ERR! npm install exited 217 in '@joplin/lib'
lerna ERR! npm install stderr:
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals
npm ERR! dest /home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/jefferyl/Projects/joplin/packages/lib/node_modules/acorn-globals' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.acorn-globals-RnxtdHqX'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_40_41_255Z-debug.log
lerna ERR! npm install exited 217 in '@joplin/lib'
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
npm ERR! code 217
npm ERR! path /home/jefferyl/Projects/joplin
npm ERR! command failed
npm ERR! command sh -c npm run bootstrap --no-ci && npm run build
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jefferyl/.npm/_logs/2021-11-04T21_40_41_315Z-debug.log
Some of the other requests it made of me:
'/home/jefferyl/Projects/joplin/packages/lib/node_modules/ansi-escape-sequences' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.ansi-escape-sequences-IlRVx4p2'
'/home/jefferyl/Projects/joplin/packages/lib/node_modules/are-we-there-yet' -> '/home/jefferyl/Projects/joplin/packages/lib/node_modules/.are-we-there-yet-uojDDi4l'
npm run clean
fixes the moving files error.
After that, I tried npm update -g
for the node-gyp issue since it reappeared.
Then I ran npm run clean
again because the moving files error showed up again.
Then, I ran rm -rf node_modules && npm install
because I got the error mentioned in this github issue
And finally, I was able successfully build Joplin! Thanks @roman_r_m