Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

can't get updated dependencies properly. MacOS 11.4 #4085

Closed
iNeedHelpX opened this issue Jun 1, 2021 · 12 comments
Closed

can't get updated dependencies properly. MacOS 11.4 #4085

iNeedHelpX opened this issue Jun 1, 2021 · 12 comments

Comments

@iNeedHelpX
Copy link

Issue

NPM wont install the dependencies!

Steps to Reproduce

npm install -g truffle

and I get a bunch of warnings:
Screen Shot 2021-05-30 at 10 32 27 PM


Screen Shot 2021-05-31 at 1 10 22 AM

Expected Behavior

normal install

Actual Results

Tons of warnings about deprecated dependencies

Environment

  • Operating System: macOS Big Sur 11.4
  • Ethereum client: ganache?
  • Truffle version (truffle version):v5.3.8
  • node version (node --version): 16.2
  • npm version (npm --version): 7.15.0
@LkingForW
Copy link

I am having the same issue, latter when I try to find truffle -v, it claims that the command not found.

@eggplantzzz
Copy link
Contributor

I don't think npm versions 7 and greater play well with Truffle. Try downgrading to 6 and let us know whether it fixes the problem.

@eqnawr
Copy link

eqnawr commented Jun 16, 2021

I don't think npm versions 7 and greater play well with Truffle. Try downgrading to 6 and let us know whether it fixes the problem.
I tried this and it showed many more errors.

y@dhamma:~$ npm install -g [email protected]

removed 60 packages, changed 103 packages, and audited 435 packages in 5s

2 packages are looking for funding
run npm fund for details

7 vulnerabilities (1 low, 3 moderate, 3 high)

To address issues that do not require attention, run:
npm audit fix

To address all issues, run:
npm audit fix --force

Run npm audit for details.

y@dhamma:~$ npm -v
6.14.7

y@dhamma:~$ npm install -g truffle
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]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported
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]: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: stable api reached
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
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 @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 WARN deprecated [email protected]: Package moved to @redux-devtools/instrument.
npm WARN deprecated [email protected]: Package moved to @redux-devtools/app.
npm WARN deprecated [email protected]: Package moved to @redux-devtools/serialize.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
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. (debug-js/debug#797)
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
/home/y/.nvm/versions/node/v16.3.0/bin/truffle -> /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/build/cli.bundled.js

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/iso-constants
node build.js > index.browser.js

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/bufferutil
node-gyp-build

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/keccak
node-gyp-build || exit 0

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/secp256k1
node-gyp-build || exit 0

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/ursa-optional
node rebuild.js

ursaNative bindings compilation fail. This is not an issue. Modules that depend on it will use fallbacks.

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/utf-8-validate
node-gyp-build

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/tiny-secp256k1
npm run build || echo "secp256k1 bindings compilation fail. Pure JS implementation will be used."

[email protected] build /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/tiny-secp256k1
node-gyp rebuild

(node:8594) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use node --trace-deprecation ... to show where the warning was created)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (node:fs:195:21)
gyp ERR! System Linux 5.4.72-microsoft-standard-WSL2
gyp ERR! command "/home/y/.nvm/versions/node/v16.3.0/bin/node" "/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/tiny-secp256k1
gyp ERR! node -v v16.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build 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/y/.npm/_logs/2021-06-16T18_13_57_285Z-debug.log
secp256k1 bindings compilation fail. Pure JS implementation will be used.

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/leveldown
node-gyp-build

[email protected] install /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/sqlite3
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-linux-x64.tar.gz
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)
(node:8678) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use node --trace-deprecation ... to show where the warning was created)
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqCallback.oncomplete (node:fs:195:21)
gyp ERR! System Linux 5.4.72-microsoft-standard-WSL2
gyp ERR! command "/home/y/.nvm/versions/node/v16.3.0/bin/node" "/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/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"
gyp ERR! cwd /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/sqlite3
gyp ERR! node -v v16.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/y/.nvm/versions/node/v16.3.0/bin/node /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/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' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:394:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Linux 5.4.72-microsoft-standard-WSL2
node-pre-gyp ERR! command "/home/y/.nvm/versions/node/v16.3.0/bin/node" "/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/sqlite3
node-pre-gyp ERR! node -v v16.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/home/y/.nvm/versions/node/v16.3.0/bin/node /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/sqlite3/lib/binding/node-v93-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/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' (1)

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/core-js-pure
node -e "try{require('./postinstall')}catch(e){}"

@apollo/[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/@apollo/protobufjs
node scripts/postinstall

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/protobufjs
node scripts/postinstall

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/level
opencollective-postinstall || exit 0

Thank you for using level!
If you rely on this package, please consider supporting our open collective:

https://opencollective.com/level/donate

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/web3-shh
echo "WARNING: the web3-shh api will be deprecated in the next version"

WARNING: the web3-shh api will be deprecated in the next version

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/web3-bzz
echo "WARNING: the web3-bzz api will be deprecated in the next version"

WARNING: the web3-bzz api will be deprecated in the next version

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle/node_modules/web3
echo "WARNING: the web3-shh and web3-bzz api will be deprecated in the next version"

WARNING: the web3-shh and web3-bzz api will be deprecated in the next version

[email protected] postinstall /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/truffle
node ./scripts/postinstall.js

  • Fetching solc version list from solc-bin. Attempt Update README.md #1
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/truffle/node_modules/chokidar/node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/truffle/node_modules/sqlite3):
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-pre-gyp install --fallback-to-build
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
  • [email protected]
    added 889 packages from 617 contributors, removed 80 packages and updated 862 packages in 112.618s

y@dhamma:~$ npm install -g npm
/home/y/.nvm/versions/node/v16.3.0/bin/npm -> /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/bin/npm-cli.js
/home/y/.nvm/versions/node/v16.3.0/bin/npx -> /home/y/.nvm/versions/node/v16.3.0/lib/node_modules/npm/bin/npx-cli.js

  • [email protected]
    added 60 packages from 25 contributors, removed 239 packages and updated 195 packages in 6.516s

y@dhamma:~$ npm install -g truffle
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]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
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. (debug-js/debug#797)
npm WARN deprecated [email protected]: Package moved to @redux-devtools/serialize.
npm WARN deprecated [email protected]: Package moved to @redux-devtools/instrument.
npm WARN deprecated [email protected]: Package moved to @redux-devtools/app.
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]: New package name format for new versions: @ethereumjs/tx. Please update.
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]: 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]: 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]: 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]: 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]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: stable api reached
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 WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 81 packages, removed 219 packages, changed 1524 packages, and audited 944 packages in 1m

80 packages are looking for funding
run npm fund for details

42 vulnerabilities (15 low, 17 moderate, 10 high)

To address all issues, run:
npm audit fix

Run npm audit for details.

@cds-amal
Copy link
Member

Hi @eqnawr there's a chance node-gyp may not be installed or have missing dependencies. Please check with their documentation and then give truffle install a go. Don't forget to fallback to npm 6 npm -g install npm@6 before installing truffle.

@eggplantzzz
Copy link
Contributor

Also, what version of Node are you using? Make sure you use a version less than 16.

@eqnawr
Copy link

eqnawr commented Jun 17, 2021

okay clean wsl 2 setup.
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt install build-essential python -y
nvm install v15.14.0
npm -g install npm@6
npm install -g node-gyp

root@dhamma:~# npm install -g truffle

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]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported
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]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: stable api reached
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
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 @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 WARN deprecated [email protected]: Package moved to @redux-devtools/instrument.
npm WARN deprecated [email protected]: Package moved to @redux-devtools/app.
npm WARN deprecated [email protected]: Package moved to @redux-devtools/serialize.
npm WARN deprecated [email protected]: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
npm WARN deprecated [email protected]: CircularJSON is in maintenance only, flatted is its successor.
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. (debug-js/debug#797)
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
/root/.nvm/versions/node/v15.14.0/bin/truffle -> /root/.nvm/versions/node/v15.14.0/lib/node_modules/truffle/build/cli.bundled.js

[email protected] install /root/.nvm/versions/node/v15.14.0/lib/node_modules/truffle/node_modules/iso-constants
node build.js > index.browser.js

sh: 1: cannot create index.browser.js: Permission denied
sh: 1: node: Permission denied

[email protected] install /root/.nvm/versions/node/v15.14.0/lib/node_modules/truffle/node_modules/bufferutil
node-gyp-build

sh: 1: node-gyp-build: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/truffle/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/truffle/node_modules/iso-constants):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node build.js > index.browser.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: node-gyp-build
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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! /root/.npm/_logs/2021-06-17T17_04_37_180Z-debug.log

@cds-amal
Copy link
Member

hi @eqnawr, the output shows that nvm is installed as root and npm is run from the root prompt which can cause permission errors like you've observed, and more importantly, introduce security vulnerabilities which will compromise your system. My recommendation is to uninstall nvm and reinstall as a non privileged user.

Sorry I can't help you with that but there are many fine articles online. This post, while a few years old is a good reference and starting point.

@141345
Copy link

141345 commented Sep 10, 2021

similar issue with win 10
node -v
v16.9.0
npm -v
7.23.0

@eggplantzzz
Copy link
Contributor

@Flame57 Try downgrading to npm version ^6

@mi3afzal
Copy link

I am able to install Truffle successfully after downgrading the node.js version to 14

MacOS: 10.15.7
Node: v14.18.3
npm: 6.14.15
Truffle: v5.4.30

@eggplantzzz
Copy link
Contributor

Does anyone experience this issue when using npm version 6?

@lsqproduction
Copy link
Contributor

closing for issue maintenance.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants