npm error installing truffle for ethereum development - linux

When I try to install truffle using npm, the following output appears:
npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
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 multicodec#0.5.7: stable api reached
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated mkdirp#0.5.1: 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 node-pre-gyp#0.11.0: 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 redux-devtools-core#0.2.1: Package moved to #redux-devtools/app.
npm WARN deprecated redux-devtools-instrument#1.10.0: Package moved to #redux-devtools/instrument.
npm WARN deprecated remotedev-serialize#0.1.9: Package moved to #redux-devtools/serialize.
npm WARN deprecated core-js#2.6.12: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated axios#0.20.0: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated debug#4.1.1: 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 fsevents#2.1.3: "Please update to latest v2.3 or v2.2"
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
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 fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jerry/.npm/_logs/2021-04-23T13_13_53_567Z-debug.log
I think it's because I do not have access as root admin. I tried restarting my PC but it still doesn't work. There's also an error where it says something about my OS. I have no ideas as I am new to Ethereum development.

I had this problem as well, and it seems the problem is how truffle packages are managed or deployed on npm, I instead used:
yarn global add truffle
And it worked. Please try it. From my experience, npm install -g truffle does not work on a Linux Ubuntu 20.04 setup(which was my environment), but it worked when I ran it on a WSL Ubuntu 20.04 Terminal. This is something maybe the truffle team may keep in mind. I also realized there are warnings around using sudo npm install -g truffle, so don't use it.

Yes, you need admin permissions to install NPM packages globally, prepend the command with sudo:
sudo npm install -g truffle

Related

Prepare ubuntu to vuejs project

I have a vuejs project done with windows. I intent migrate to linux ubuntu.
So, I have now a Ubuntu as my dev machine.
I used git and cloned the project.
After I issue a npm install, I get some errors as:
...
npm WARN deprecated #types/browserslist#4.15.0: This is a stub types definition. browserslist provides its own type definitions, so you do not need this installed.
npm WARN deprecated #types/anymatch#3.0.0: This is a stub types definition. anymatch provides its own type definitions, so you do not need this installed.
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated querystring#0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated svgo#1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated core-js#2.6.12: 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 ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /home/luiz/.nvm/versions/node/v18.12.0/bin/node /home/luiz/.nvm/versions/node/v18.12.0/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/home/luiz/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN ERESOLVE overriding peer dependency
npm ERR! npm WARN While resolving: gulp-better-rollup#4.0.1
npm ERR! npm WARN Found: rollup#2.35.1
npm ERR! npm WARN node_modules/rollup
npm ERR! npm WARN dev rollup#"^2.35.1" from the root project
npm ERR! npm WARN 3 more (rollup-plugin-babel, rollup-plugin-commonjs, rollup-plugin-node-resolve)
npm ERR! npm WARN
npm ERR! npm WARN Could not resolve dependency:
npm ERR! npm WARN peer rollup#"^1.4.1" from gulp-better-rollup#4.0.1
npm ERR! npm WARN node_modules/gulp-better-rollup
npm ERR! npm WARN dev gulp-better-rollup#"^4.0.1" from the root project
npm ERR! npm WARN
npm ERR! npm WARN Conflicting peer dependency: rollup#1.32.1
npm ERR! npm WARN node_modules/rollup
npm ERR! npm WARN peer rollup#"^1.4.1" from gulp-better-rollup#4.0.1
npm ERR! npm WARN node_modules/gulp-better-rollup
npm ERR! npm WARN dev gulp-better-rollup#"^4.0.1" from the root project
npm ERR! npm WARN deprecated stable#0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm ERR! npm WARN deprecated #stylelint/postcss-markdown#0.36.2: Use the original unforked package instead: postcss-markdown
npm ERR! npm WARN deprecated har-validator#5.1.3: this library is no longer supported
npm ERR! npm WARN deprecated source-map-resolve#0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated libnpmconfig#1.2.1: This module is not used anymore. npm config is parsed by npm itself and by #npmcli/config
npm ERR! npm WARN deprecated plugin-log#0.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm ERR! npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! npm WARN deprecated source-map-url#0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated circular-json#0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! npm WARN deprecated rollup-plugin-no

NPM ERR! code 1 when installing any packages on Windows 10

I don't know what changed on my windows PC, but I can't install any packages on my PC right now. I tried installing these packages today:
npm install needle
npm install got
npm install oauth-1.0a
and I received very similar error messages. I didn't have this problem before so I'm really confused as to why i'm having these errors now.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\Tyree\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\Tyree\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > wyvern-schemas#0.14.1 prepublish
npm ERR! > scripts/build.sh
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ProjectOpenSea/wyvern-js.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ahultgren/async-eventemitter.git
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated uuid#3.3.2: 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 ERR! npm WARN deprecated uuid#3.4.0: 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 ERR! npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated mkdirp-promise#5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm ERR! npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! npm WARN deprecated multibase#0.7.0: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated multibase#0.6.1: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated mkdirp#0.5.1: 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 ERR! npm WARN deprecated multicodec#0.5.7: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated popper.js#1.14.3: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm ERR! npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated eth-sig-util#1.4.2: Deprecated in favor of '#metamask/eth-sig-util'
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated uuid#2.0.1: 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 ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethashjs#0.0.8: New package name format for new versions: #ethereumjs/ethash. Please update.
npm ERR! npm WARN deprecated ethereumjs-blockchain#4.0.4: New package name format for new versions: #ethereumjs/blockchain. Please update.
npm ERR! npm WARN deprecated uuid#3.2.1: 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 ERR! npm WARN deprecated ethereumjs-tx#1.3.7: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-vm#2.6.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated ethereumjs-block#1.7.1: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated multicodec#1.0.4: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm ERR! npm WARN deprecated ethereumjs-account#3.0.0: Please use Util.Account class found on package ethereumjs-util#^7.0.6 https://github.com/ethereumjs/ethereumjs-util/releases/tag/v7.0.6
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated cids#0.7.5: This module has been superseded by the multiformats module
npm ERR! npm WARN deprecated ethereumjs-vm#4.2.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated core-js#2.6.12: core-js#<3.4 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 ERR! 'scripts' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\Tyree\AppData\Local\npm-cache\_cacache\tmp\git-clonemSjZbY
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c scripts/build.sh
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\Tyree\AppData\Local\npm-cache\_logs\2022-10-19T19_46_18_861Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Tyree\AppData\Local\npm-cache\_logs\2022-10-19T19_46_17_124Z-debug-0.log
Try Uninstalling and Re-installing Node to the latest Stable Version.

how to solve npm ERR code 1 when running npm opensea js

I'm getting multiple errors and I'm really struggling with this for more than 3-4 hours. Because I tried the solutions of those who received this error before, but failed. It would be appreciated if you could help.
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\ewaR\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\ewaR\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > wyvern-schemas#0.14.1 prepublish
npm ERR! > yarn build
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ahultgren/async-eventemitter.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ethereumjs/ethereumjs-abi.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ProjectOpenSea/wyvern-js.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/frozeman/bignumber.js-nolookahead.git
npm ERR! npm WARN skipping integrity check for git dependency ssh://git#github.com/ProjectWyvern/ethereumjs-abi.git
npm ERR! npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated safe-event-emitter#1.0.1: Renamed to #metamask/safe-event-emitter
npm ERR! npm WARN deprecated ethereumjs-block#2.2.2: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated eth-sig-util#1.4.2: Deprecated in favor of '#metamask/eth-sig-util'
npm ERR! npm WARN deprecated uuid#3.0.1: 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 ERR! npm WARN deprecated ethereumjs-tx#2.1.2: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated uuid#3.4.0: 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 ERR! npm WARN deprecated uuid#3.4.0: 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 ERR! npm WARN deprecated nomnom#1.8.1: Package no longer supported. Contact support#npmjs.com for more info.
npm ERR! npm WARN deprecated mkdirp#0.5.1: 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 ERR! npm WARN deprecated uuid#2.0.1: 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 ERR! npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated ethereumjs-tx#1.3.7: New package name format for new versions: #ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated ethereumjs-block#1.7.1: New package name format for new versions: #ethereumjs/block. Please update.
npm ERR! npm WARN deprecated ethereumjs-vm#2.6.0: New package name format for new versions: #ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated ethereumjs-common#1.5.2: New package name format for new versions: #ethereumjs/common. Please update.
npm ERR! npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm ERR! npm WARN deprecated core-js#2.6.12: core-js#<3.4 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 ERR! 'yarn' is not recognized as an internal or external command,
npm ERR! operable program or batch file.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\ewaR\AppData\Local\npm-cache\_cacache\tmp\git-cloneViKlSY
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c yarn build
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\ewaR\AppData\Local\npm-cache\_logs\2022-03-12T03_31_24_992Z-debug-0.log
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ewaR\AppData\Local\npm-cache\_logs\2022-03-12T03_31_23_039Z-debug-0.log^
I believe this issue is from installing opensea-js with a newer version of Nodejs. I had this same exact issue and I downgraded to Node v14.7.* (I believe) and it resolved my issue. Opensea-js is running on an old version of node for some reason, which is why it's causing this issue.

I get the following npm error on installing Vue Js

I installed Node.js using Snap on my Parrot OS system.
I don't know why, but I don't have the node_modules folder after /usr/local/lib
This is the error I get with npm install -g #vue/cli
npm WARN deprecated #hapi/joi#15.1.1: joi is leaving the #hapi organization and moving back to 'joi' (https://github.com/sideway/joi/issues/2411)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/topo#3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/hoek#8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated #hapi/address#2.1.4: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated chokidar#2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
/usr/local/bin/vue -> /usr/local/lib/node_modules/#vue/cli/bin/vue.js
npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/2913/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> core-js#3.6.5 postinstall /usr/local/lib/node_modules/#vue/cli/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
2020/08/12 15:51:38.149740 cmd_run.go:918: WARNING: cannot create user data directory: cannot create "/nonexistent/snap/node/2913": mkdir /nonexistent: permission denied
cannot create user data directory: /nonexistent/snap/node/2913: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.7 (node_modules/#vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #vue/compiler-sfc#3.0.0-rc.5 requires a peer of vue#3.0.0-rc.5 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js#3.6.5 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the core-js#3.6.5 postinstall 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/2020-08-12T10_21_41_518Z-debug.log
edit :-
while using sudo i get the following error - sudo: npm: command not found. So I ran su first, then tried npm install -g #vue/cli but then i get the error originally asked in the question.
When you install npm packages globally, you have to run the install command as administrator.
try to run,
sudo npm install -g #vue/cli

Unable to install Hyperledger Composer on Ubuntu

I am trying to install Hyperledger composer on Ubuntu 20.04 but I am getting error.
I am following the steps given on https://hyperledger.github.io/composer/latest/installing/development-tools.html
But when I run npm install -g composer-cli#0.20, I get the following error:
npm WARN deprecated composer-cli#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-wallet-inmemory#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-admin#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-documentation#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-wallet-filesystem#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-report#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-common#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-client#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-connector-proxy#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated composer-connector-hlfv1#0.20.9: Hyperledger Composer has been deprecated. Please see the README for more details: https://github.com/hyperledger/composer/blob/master/README.md
npm WARN deprecated core-js#2.3.0: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated hoek#4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated json3#3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated chokidar#1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm WARN notsup Unsupported engine for fabric-ca-client#1.2.1: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"12.16.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: fabric-ca-client#1.2.1
npm WARN notsup Unsupported engine for fabric-client#1.2.1: wanted: {"node":"^8.9.0","npm":"^5.5.1"} (current: {"node":"12.16.0","npm":"6.14.4"})
npm WARN notsup Not compatible with your version of node/npm: fabric-client#1.2.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/composer-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/samarth/.npm/_logs/2020-05-12T09_26_08_612Z-debug.log
How can I install Composer?
Any help would be appreciated.
Hyperledger Composer is deprecated since Aug 2019. Your error message displays the warning as well
Please check the announcement at https://hyperledger.github.io/composer/latest/
Suggest you use chaincode and client applications written in Node / React etc.
Just try to change tout npm version and node version
For example :
Npm v5.6.0
Node : 8.6.0

Resources