Cannot install @angular/cli
Solution 1
Make sure.,you already installed nodejs.
npm install -g angular-cli
ng help
ng new PROJECT_NAME cd PROJECT_NAME ng serve
ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153
Solution 2
This command solved this problem for me:
npm install -g rimraf
The TLS key was a real problem and also install windows-tools does not help. After rimraf and using the right proxy settings and node_modules destination I can install angular-cli.
Solution 3
Try this -
Global Package :
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
Local Package :
rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @angular/cli@latest
npm install
Solution 4
Can you try from the users directory C:\Users\userName or PC name just as shown in the below figure, and make sure you're not limited to any network related issues !
https://s-media-cache-ak0.pinimg.com/originals/87/50/24/87502456dd8043729b794bf00ee2c7e7.jpg
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
I am trying to work on angular2 for which I have installed nodeJS. I have followed the steps given here https://github.com/angular/angular-cli#prerequisites but there seems to be an issue. Here's what I did in the Command Prompt(Admin):
C:\WINDOWS\system32>node -v v6.10.1 C:\WINDOWS\system32>npm -v 3.10.10 C:\WINDOWS\system32>npm install -g @angular/cli [ ..............] / loadRequestedDeps: sill install loadAllDepsIntoIdealTree
My command prompt is stuck at this command and shows no sign of response. I will be glad if there are any suggestions on solving this issue of mine. Is there anything I am missing here?