If you look a the picture I made sure I had npm and node and then tried to install Angular CLI and it does not give me an error or anything. I am not sure what I have done. This laptop did crash a while back and I reloaded it not sure if that would contribute to this issue.
I even updated npm and node to the latest to see if that would fix the issue. I am on Windows 10 Home edition. The angular CLI seems to be working on my home desktop. How can I get this working again even if I uninstall something to get it working correctly.
I thought it was NPM but somehow I have the loglevel set to silent.
Try installing it globally,
npm install -g #angular/cli
Give an uninstall a try.
npm uninstall -g #angular/cli
npm cache clean
npm install -g #angular/cli#latest
In the screenshot you posted, there is this line
npm ERR! npm -v 1.3.21
Maybe you should reinstall node also.
I finally uninstalled NODE completely and found the extra folders left over and reinstalled and that has fixed my issue. Nothing to do with Angular. Thanks for helping.
Try this:
npm install angular-cli
Related
My npm install seems to have stopped working out of nowhere, regardless of if i do npm i or npm install I keep getting an error saying npm ERR! Unexpected token '.' The other npm commands seem to be working perfectly but I can't install any modules because of this error. I'm using npm 8.7.0 and node v14.18.1
The simplest solution I could find and what worked for me was completely removing and unisntalling everything to do with nodejs and npm from my laptop. I then reinstalled it back with no issues and am able to use the command now.
As mentioned in one of the answers, try deleting the node_modules folder and package.lock.json. Use
sudo npm install
And if that doesn't work, what I would suggest is that you use yarn. If you don't know what yarn is, it's just a package manager like node.
You can install yarn by using the following command:
npm install -g yarn
After this make sure all the node modules and package.lock.json is deleted. Now run the command
yarn install
Hopefully, this will fix your issue.
when I am using command npm install -g lerna it gets executed with no error but after that using command
lerna --version gives output "lerna:command not found".
Possible solution
maybe if somehow I manage it to install in usr/local/lib/node_modules it should work cause other npm packages installed here are working fine but its getting installed in /home/surajkulriya/.npm-global/lib/node_modules.
OS: ubuntu 18.04
which npm:/usr/local/bin/npm
which node:/usr/local/bin/node
which nodejs:/usr/bin/nodejs
Finally after too much effort I sorted out the issue. I removed node nodejs and npm completely and reinstalled them again and used command
npm i -g npm
to fix the broken dependecies.I reinstalled lerna and it worked.
PLEASE HELP!
Just a noob here, I am trying to work with some npm packages like sass, and I get this strange error mentioning LINUX OS, which was just tried to install on my computer.
How to fix this? Just to continue with my work, please.
Thanks in advance!
npm install node-sass --save-dev
Parameter --save-dev instead of --save dev ,You can run npm --help to see more details.
According to node-sass package docs there are prerequisites for windows:
https://www.npmjs.com/package/node-sass
You can find the node-gyp install details here:
https://github.com/nodejs/node-gyp#on-windows
If you are trying to install sass while your server is still running and getting this error, you can try restarting your server.
Try this
npm install -g node-sass
I am trying to make ionic2 app. But npm is not supporting. It always gives me this error.
Try to install previous version of npm:
npm install npm#5.2 -g
Unfortunatelly, current version(5.3) has a lot of bugs.
I found solution of it. Solution is uninstall node and npm completely from your PC and then re-install it.
to uninstall node and npm completely check this link.
How to completely remove node.js from Windows
This worked for me:
npm install -g --only=production --save har-schema
I updated my npm and ionic yesterday and my ionic project that was originally working is giving me this error.
Error('`libsass` bindings not found. Try reinstalling `node-sass`?');
I tried
sudo npm install node-sass
sudo npm -g install node-gyp
sudo npm rebuild node-sass
but it did not work. Any help would be appreciated.
Never use sudo with npm. You will have lot of problems with permissions if you do that. And for your issue, this helped me:
npm cache clean && node ./node_modules/node-sass/scripts/install.js
Try also removing all node modules before that (whole folder), run npm install (without sudo) and then if it doesn't work run the command that I wrote.