I keep getting this error when i try to install Angular/Cli via git-bash/chocolaty;
Josh#DESKTOP-BKT7CAR MINGW64 ~ (main)
$ npm install -g #angular/cli
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated debug#4.2.0: 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.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
changed 253 packages, and audited 254 packages in 16s
16 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Can someone help me fix this. I have the latest NPM/NodeJS versions installed.
There're not errors Just warning I think that our only option is to wait for the package maintainer's to get their dependencies straight ignore it and hope for a update soon.
Related
I am new to javascript. I am trying to learn javascript by following instructions here. I am trying to install live-server package using npm but I am seeing the following error.
$ npm install -g live-server
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated opn#6.0.0: The package has been renamed to `open`
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
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.
changed 208 packages, and audited 209 packages in 7s
2 high severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
sshil-414HTD6:IssueTracker sshil$ npm audit fix --force
npm WARN using --force Recommended protections disabled.
up to date, audited 1 package in 192ms
found 0 vulnerabilities
$ npm i live-server
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated opn#6.0.0: The package has been renamed to `open`
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
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.
added 208 packages, and audited 209 packages in 6s
3 high severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
$ npm version
{
issuetracker: '1.0.0',
npm: '8.19.2',
node: '19.0.0',
v8: '10.7.193.13-node.16',
uv: '1.43.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.18.1',
modules: '111',
nghttp2: '1.47.0',
napi: '8',
llhttp: '8.1.0',
openssl: '3.0.5+quic',
cldr: '41.0',
icu: '71.1',
tz: '2022b',
unicode: '14.0',
ngtcp2: '0.8.1',
nghttp3: '0.7.0'
}
You shouldn't bother too much about it. It's more an warning than error. And there is not much you can do. To check if the package is installed, go in package.json file, it should be in dependencies object.
Nowadays if you use vscode you don't need to install live-server as it is already built in.
You can read more about npm audit here npm audit: Broken by Design
I have project on bitbucket and trying to clone it, the project is very older 3 year old so might be some packages do get old. But while I am doing npm install so it is showing a lot of warning and errors. Also the project at beginning made with Yarn not NPM.
Some warning and error looks like:
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN deprecated ini#1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm WARN deprecated flatten#1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated #hapi/bourne#1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator#5.1.3: this library is no longer supported
npm WARN deprecated chokidar#2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fe
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url#0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated left-pad#1.3.0: use String.prototype.padStart()
npm WARN deprecated debug#4.1.1: Debug versions >=3.2.0 <3.2.7[1] || >=4 <4.3.1 have a low-severity ReDos regression when used incommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
Remove your package-lock.json and then execute npm install (or yarn install if you prefer).
Have in mind that being this an old project. Some of the packages passed for major changes and may possibly not run as expected anymore. Major changes are not necessarily backward compatible, so you may have to change a lot of code in order to make your code work. Be ready to have a lot of fun coding!
EDIT: Considering the package.json you posted in a comment, my suggestion is creating a new app using npx create-react-app and then moving your ReactJS code to it. This way you would have a completely updated app and would have only to review your code.
After installing macOS big Sur Version 11.4, I couldn't run the sudo npm i -g expo cli to download the files from DoneWithIt. What can I do? Here are the codes:
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 sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
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 WARN deprecated uglify-es#3.3.9: support for ECMAScript is superseded by uglify-js as of v3.13.0
npm WARN deprecated core-js#1.2.7: 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.
changed 832 packages, and audited 833 packages in 47s
28 packages are looking for funding
run npm fund for details
5 low severity vulnerabilities
To address all issues, run:
npm audit fix
Run npm audit for details.
deji150#Dejis-MBP ~ % npm install -g #angular/cli#9
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)
^[[B⸨░░░░░░░░░░░░░░░░░░⸩ ⠏ fetchMetadata: WARN deprecated debug#4.1.1: Debug ver^[[B⸨░░░░░░░░░░░░░░░░░░⸩ ⠸ fetchMetadata: sill resolveWithNewModule #schematics/^[[B⸨░░░░░░░░░░░░░░░░░░⸩ ⠸ fetchMetadata: sill resolveWithNewModule #schematics/^[[B⸨░░░░░░░░░░░░░░░░░░⸩ ⠸ fetchMetadata: sill resolveWithNewModule #schematics/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
/Users/deji150/.npm-global/bin/ng -> /Users/deji150/.npm-global/lib/node_modules/#angular/cli/bin/ng
#angular/cli#9.1.15 postinstall /Users/deji150/.npm-global/lib/node_modules/#angular/cli
node ./bin/postinstall/script.js
#angular/cli#9.1.15
added 104 packages from 67 contributors, removed 150 packages and updated 33 packages in 47.785s
deji150#Dejis-MBP ~ % ng --version
zsh: command not found: ng
deji150#Dejis-MBP ~ %
Does npx ng version work?
Its most likely that the path to your global node/bin path is not added to your systems path variable.
Then follow this and it should do the trick
https://stackoverflow.com/a/15623632/2046263
there are a few steps:
Use node v10+ instead of v14+.
(IMPT) add the following path to ~/.zshrc (if you are using zsh)
/Users/[yourUsername]/.npm-packages/bin
/Users/[yourUsername]/.npm-global/bin
run source ~/.zshrc after modifying the file.
Much thanks to #kissu and #Lakindu Hewawasam !!
-------original question-------
I'm on MacOS 10.15.5, node version v14.15.4, npm version 6.14.10.
I've been getting the error zsh: command not found: vue, after trying multiple ways to download Vue.
I first tried npm install -g #vue/cli, and it was giving me this error, so I uninstalled and tried again with sudo npm install -g #vue/cli #vue/cli-init --unsafe-perm referring to this. Still, it doesn't work:
yingjieqiao#Yingjies-MacBook-Pro ~ % sudo npm install -g #vue/cli #vue/cli-init --unsafe-perm
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated #hapi/joi#15.1.1: Switch to 'npm install joi'
npm WARN deprecated #hapi/hoek#8.5.1: 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/address#2.1.4: Moved to 'npm install #sideway/address'
npm WARN deprecated #hapi/bourne#1.3.2: 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 resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#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.
npm WARN deprecated vue-cli#2.9.6: This package has been deprecated in favour of #vue/cli
npm WARN deprecated coffee-script#1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
> yarn#1.22.10 preinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)
/Users/yingjieqiao/.npm-global/bin/vue -> /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/bin/vue.js
> fsevents#1.2.13 install /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/fsevents
> node install.js
SOLINK_MODULE(target) Release/.node
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
> core-js#3.8.2 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/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 -)
> #apollo/protobufjs#1.0.5 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/#apollo/protobufjs
> node scripts/postinstall
> nodemon#1.19.4 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/nodemon
> node bin/postinstall || exit 0
> ejs#2.7.4 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/#vue/cli/node_modules/ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm WARN #vue/compiler-sfc#3.0.5 requires a peer of vue#3.0.5 but none is installed. You must install peer dependencies yourself.
+ #vue/cli#4.5.9
+ #vue/cli-init#4.5.9
added 1367 packages from 714 contributors and updated 1 package in 43.692s
yingjieqiao#Yingjies-MacBook-Pro ~ % vue --version
zsh: command not found: vue
yingjieqiao#Yingjies-MacBook-Pro ~ % npm update -g #vue/cli
yingjieqiao#Yingjies-MacBook-Pro ~ % vue --version
zsh: command not found: vue
yingjieqiao#Yingjies-MacBook-Pro ~ %
In the warning message, it mentioned "xxx package will break on node v14+" a few times. But I think the download command in the official docs should work regardless?
Looking for the comments just below the other answer, you may try adding those
export PATH="$PATH:$(yarn global bin)"
export PATH="$PATH:$HOME/.npm-global/bin"
to your ~/.zshrc file since vue-cli is properly installed apparently.
Ofc, source ~/.zshrc before trying to call the CLI again.
In my experience the node version 10.23.0 works best for myself. So I recommend using this because I have solved errors like this using the version 10.23.0.
Download here: https://nodejs.org/dist/latest-v10.x/
And then, once you have this version of node installed, run the command $ npm install vue
You should not install any package w/ a sudo prefix.
How is your node version installed btw, via nvm or manually ?
Maybe try to install it w/ yarn.
Best idea would probably be to rollback and try to debug the issues on the recommended way. Maybe digging into specific issues on the github repo.
Btw, the post you're referencing is an old one so things probably changed in between.
I'm on Linux running the following versions (#vue/cli 4.5.9 is fine too, just upgraded).
EDIT: Also, this post may maybe help somehow.