Windows: 10 Pro (64-bit)
Node: 8.11.0
NPM: 5.6.0
Your environment has been set up for using Node.js 8.11.0 (x64) and npm.
C:\Users\ranch>npm -v
5.6.0
C:\Users\ranch>node -v
v8.11.0
C:\Users\ranch>np -v
'np' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\ranch>npm install -g @angular/cli
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular\cli\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:\Users\ranch\AppData\Roaming\npm\node_modules\.staging\fsevents-1cd82493\node_modules\aproba' -> 'C:\Users\ranch\AppData\Roaming\npm\node_modules\.staging\aproba-15c81fb8'
npm ERR! path C:\Users\ranch\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@ngtools\json-schema
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\ranch\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@ngtools\json-schema' -> 'C:\Users\ranch\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@ngtools\.json-schema.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\ranch\AppData\Roaming\npm-cache\_logs\2018-03-30T04_50_51_261Z-debug.log
I've tried both running the this in the regular command prompt as admin and myself with the same results.
I've tried getting the lastest (npm install -g @angular/cli@latest) with no success.
I've tried changing the user defined PATH in the Environment Variable to the location of npm in my machine (C:\Program Files\nodejs\node_modules\npm) but didnt have any luck that route either.
Any suggestions?
This is an environment issue, not a cli issue.
Uninstall your node in control panel and download latest release. I would also give yarn a try, but the problem is your node installation.
@ranchan02 On Windows you need to use option --no-optional:
npm install -g @angular/cli --no-optional
Pity that Angular team doesn't care to include this important detail into the official documentation, always giving us not CLI problem cop out.
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@ranchan02 On Windows you need to use option
--no-optional:Pity that Angular team doesn't care to include this important detail into the official documentation, always giving us
not CLI problemcop out.