Installing grunt locally went wrong? - angularjs

I'm new with angularjs and I'm following a course to learn it but I got an issue while installing grunt locally, and this is the error I get:
C:\wamp\www\Projets\AngularJS>npm install grunt --save-dev
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "grunt" "--save-dev"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package karma#1.3.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer karma-jasmine#1.0.2 wants karma#*
npm ERR! peerinvalid Peer karma-phantomjs-launcher#1.0.2 wants karma#>=0.9
npm ERR! peerinvalid Peer gulp-karma#0.0.4 wants karma#>=0.10 <=0.13
npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp\www\Projets\AngularJS\npm-debug.log
I've executed the command line as administrator while doing this but still getting this error.
Thnx in advance for your time.

It's a known issue that is solved by upgrading your npm with npm 3.
You can do it by :
npm install -g npm#3
or
upgrade your nodejs to nodejs 6 who come with npm 3 by default
From npm 3 the peerdependencies will generate WARN instead of ERR
Hope it will help you to solve your problem.

Related

I cannot run npm install - ERESOLVE could not resolve

I have recently just cloned my project on to a fresh computer from Github. I deleted my node modules and ran npm install and I was presented with:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #react-native-firebase/auth#14.2.1
npm ERR! Found: #react-native-firebase/app#13.0.1
npm ERR! node_modules/#react-native-firebase/app
npm ERR! #react-native-firebase/app#"^13.0.1" from the root project
npm ERR! peer #react-native-firebase/app#"13.0.1" from #react-native-firebase/storage#13.0.1
npm ERR! node_modules/#react-native-firebase/storage
npm ERR! #react-native-firebase/storage#"^13.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #react-native-firebase/app#"14.2.1" from #react-native-firebase/auth#14.2.1
npm ERR! node_modules/#react-native-firebase/auth
npm ERR! #react-native-firebase/auth#"^14.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #react-native-firebase/app#14.2.1
npm ERR! node_modules/#react-native-firebase/app
npm ERR! peer #react-native-firebase/app#"14.2.1" from #react-native-firebase/auth#14.2.1
npm ERR! node_modules/#react-native-firebase/auth
npm ERR! #react-native-firebase/auth#"^14.2.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/jacksaunders/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jacksaunders/.npm/_logs/2022-06-18T18_48_11_817Z-debug-0.log
I have tried downgrading the packages, but I don't think I'm doing it right because it is not working. I have tried npm audit fix but that didn't work for me either and I am presented with the same error as above.
If anyone can help me get back up and running that would be great!
Thank you!
This error could be a directory issue. When cloning projects, you may have put your project folder inside a new folder you created. For example, C:/Users/myApp/myApp
Double check that your terminal you are running commands from is in the correct directory. This is a simple mistake I have made many times, causing that exact error.
If that is not the case, then I would freshly reinstall Firebase on this project. Check the log and see if all of the errors are firebase related from your code sample. Completely uninstalling firebase after npm install and installing the package separately can fix the issue.

i am getting the following error while installing material-UI in vs code with npm WHAT SHOULD I DO?

npm ERR! node_modules/react
npm ERR! react#"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.0" from #material-ui/core#4.12.4
npm ERR! node_modules/#material-ui/core
npm ERR! #material-ui/core#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\ayush tawar\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ayush tawar\AppData\Local\npm-cache_logs\2022-06-10T07_31_54_848Z-debug-0.log
PS C:\Users\ayush tawar\OneDrive\Desktop\twitter clone>
Please try to do like this
npm cache clean
and then
npm install -g node-gyp
npm install --g --production windows-build-tools
Error installing bcrypt with npm
You can also add --verbose flag at the end of npm install which will show more
information about this issue.
if second command will not work, then you should install python to your pc and install this one.
npm install --g windows-build-tools
I believe if you will use ubuntu or mac os, it will be resolved maybe.
Or it could be node version issue, please upgrade node version.
The package is not up to date for react 18.
Just install it with --legacy-peer-deps, this will override the error checking.
npm install #material-ui/core --legacy-peer-deps

windows npm err while installing yo angular-fullstack

i'm trying to install yo angular fullstack, using those versions:
node v5.7.0
npm 3.7.3
yo 1.6.0
bower 1.7.7
I'm getting some npm err
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sahar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.7.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! v8-debug#0.4.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#0.4.6 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs v8-debug
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls v8-debug
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Sahar\Desktop\Clones\npm-debug.log
This is likely a widows issue. Highly recommended to use node on Linux. Get virtual box and vagrant and spin up Linux virtual machines on a Windows host with a single 'vagrant up' command
I would highly recommend docker too. Get yourself a docker node image inside your VM and you're laughing.
This is the whole attraction of virtual machines, u can just kill them and create another in secs / mins and u avoid all these stupid time wasting setup issues
Hopefully this helps

Failed at the angular-seed#0.0.0 postinstall script 'bower install'

I am getting below exception when I run the command npm install from my project directory in webstorm IDE.
bower angular-route#~1.4.0 ENOGIT git is not installed or not in the PATH
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! angular-seed#0.0.0 postinstall: `bower install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-seed#0.0.0 postinstall script 'bower install'.
npm ERR! This is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower install
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-seed
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\sample5\npm-debug.log
I have already installed node js and installed bower using command npm install -g bower.
Please help me how to fix this issue?

peerinvalid Angular fire generator error

When i run npm install -g grunt-cli i get the following error
npm ERR! peerinvalid The package generator-angular does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer generator-angularfire#0.0.6 wants generator-angular#~0.7.1
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /Users/muhammadatif/Documents/tutorials/angular-101
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! code EPEERINVALID
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users//Documents/tutorials/angular-101/npm-debug.log
npm ERR! not ok code 0
Seems this is a problem with generator-angularfire not been tested against the newer versions of generator-angular. You can read more about Peer Dependencies in NPM in this official blog post.
What helped for me:
npm uninstall -g generator-angular
npm uninstall -g generator-karma
Then running again npm install -g generator-angularfire (or in your case: npm install -g grunt-cli) should solve the problem, because it will install older, compatible versions of the above 2 generators.

Resources