1

I am trying to update Angular-CLI with $ npm install -g @angular/cli because it had many problems before.But now it's throwing the following error.Can someone help me?

module.js:549
throw err;
^

Error: Cannot find module 
'C:\Users\akmal\AppData\Local\Temp\npm.5980\package\bin\npm-cli.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
Vikas
  • 11,859
  • 7
  • 45
  • 69
  • see this https://stackoverflow.com/questions/43931986/how-to-upgrade-angular-cli-to-the-latest-version – Vikas Mar 28 '18 at 06:17

4 Answers4

0

I also had the similar problem. Please try installing vs code and GIT and restart your system reinstall the angular. It solved my problem

I also installed node-modules using npm install -g node-modules and it should be installed in the root folder

https://gitforwindows.org/ for GIT,

https://code.visualstudio.com/Download for Visual studio Code.

0

Right click on the node setup file(msi), then click on 'Repair'. That worked for me.

Upon the completion of repair,

You may need to restart your IDE or even it may prompt you to restart your device.

ankit
  • 1
  • 1
0

please first uninstall the existing angular/cli and then re-install with

$sudo npm install -g @angular/cli

and please check your package.json file to know either it is "angular/cli" or "angular-cli" , because both cli name may be same.

0

Hi I faced the same problem finally I got the solution as well.

I just follow the missing module like as below

npm install -g missing-modules