3

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?

3 Answers 3

4

Uninstalling the package first solved the problem:

npm uninstall -g angular-cli
npm install -g angular-cli
Sign up to request clarification or add additional context in comments.

Comments

1

update your node then run the command prompt as administrator and try this:

npm install -g [email protected]

Comments

0

I have solved these error by just following these steps.

  1. 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.
  2. If you have already installed some of @angular/cli, then uninstall it by,

    npm uninstall -g angular-cli

  3. clean the npm cache as

npm cache clean

  1. Then try to install as

    npm install -g @angular/cli@latest

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.