Reputation: 91
When i try to to install angular via npm i get this error message:
npm install -g @angular/cli
npm ERR! path C:\Users\myname\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\acorn
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\myname\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\acorn' -> 'C:\Users\myname\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\.acorn.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myname\AppData\Roaming\npm-cache\_logs\2017-07-26T15_20_28_022Z-debug.log
current setup:
node -v v6.11.1
npm -v 5.3.0
Upvotes: 0
Views: 288
Reputation: 91
VOILA!! I found the answer. Actually i can't claim that is a real answer to the problem but it worked damn well. So what i did is, i ran bash as administrator (i did this many times before but didn't worked), and i did next:
$npm cache verify (to see what will happen after i deleted some stuff, uncompleted angular package in node_modules directory for example)
$npm update ( update all outdated local packages )
$npm update -g ( update global packages )
$npm install -g @angular/cli
Maybe running bush as administrator wasn't necessary, maybe just npm update was enough. Anyway, i hope this solution will be helpful to someone.
Upvotes: 1