I have latest version of node and npm:
> npm -v
3.10.8
> node -v
v4.6.1
Getting this when installing angular-cli
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Misha\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v4.6.1
npm ERR! npm v3.10.8
npm ERR! path C:\Users\Misha\AppData\Roaming\npm\node_modules\.staging\abbrev-9f02c1d4
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Mishap\AppData\Roaming\npm\node_modules\.staging\abbrev-9f02c1d4' -> 'C:\Users\Mishap\AppData\Roaming\npm\node_modules\angular-cli\node_modules\npm\node_modules\abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Mishap\AppData\Roaming\npm\node_modules\.staging\abbrev-9f02c1d4' -> 'C:\Users\Mishap\AppData\Roaming\npm\node_modules\angular-cli\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
Any ideas?
asked Oct 20, 2016 at 3:49
mishap
8,56514 gold badges63 silver badges93 bronze badges
3 Answers 3
Uninstalling the package first solved the problem:
npm uninstall -g angular-cli
npm install -g angular-cli
answered Oct 20, 2016 at 14:05
mishap
8,56514 gold badges63 silver badges93 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
update your node then run the command prompt as administrator and try this:
npm install -g [email protected]
answered Mar 10, 2017 at 13:53
Hadi
5491 gold badge4 silver badges4 bronze badges
Comments
I have solved these error by just following these steps.
- First and very most important step, Open command prompt in Administrator mode. Reason, why I am saying it's important, because sometimes reading and writing files in generally aborted due to files read write permission available in your system.
If you have already installed some of @angular/cli, then uninstall it by,
npm uninstall -g angular-cli
clean the npm cache as
npm cache clean
Then try to install as
npm install -g @angular/cli@latest
answered Dec 10, 2018 at 17:31
Vikas Gupta
1,2311 gold badge12 silver badges27 bronze badges