angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Error when installing Angular-Cli on a very new machine

Open anupamarachuri opened this issue 10 years ago • 8 comments

#2807 $ npm install -g angular-cli npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls gracef ul-fs' to find it in the tree. npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: This package is discontinued. Use lodash@^4.0.0. npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130 C:\Users\mainuser\AppData\Roaming\npm `-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\angular-cli\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "angular-cli" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! path C:\Users\mainuser\AppData\Roaming\npm\node_modules\angular-cli npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall rename

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\mainuser\AppData\Roaming\npm\node_modules\angular-cli' -> 'C:\Users\mainuser\AppData\Roaming\npm\node_modules.angula r-cli.DELETE' npm ERR! at moveAway (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5) npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7) npm ERR! at FSReqWrap.oncomplete (fs.js:123:15) npm ERR! npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\mainuser\AppData\Roaming\npm\node_modules\angular-cli' -> 'C:\Users\mainuser\AppData\Roaming\npm\node_modules.angula r-cli.DELETE' npm ERR! at Error (native) npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\mainuser\AppData\Roaming\npm\node_modules\angular-cli' -> 'C:\Users\mainuser\AppData\Roaming\npm\node_modules.angul ar-cli.DELETE' npm ERR! at moveAway (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:38:5) npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:27:7) npm ERR! at FSReqWrap.oncomplete (fs.js:123:15) npm ERR! npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\mainuser\AppData\Roaming\npm\node_modules\angular-cli' -> 'C:\Users\mainuser\AppData\Roaming\npm\node_modules.angula r-cli.DELETE' npm ERR! at Error (native) npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\mainuser\npm-debug.log

$ node -v v6.9.1

$ npm -v 3.10.8

I tried this in many machines and getting the same error. Its a Windows 64Bit Machine and trying to install from GIT Bash.

I also formatted my machine and tried to install again and not working. Please suggest if the angular-cli is stable or not yet and a solution for this error .

Thank you very much in advance!

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

anupamarachuri avatar Oct 21 '16 15:10 anupamarachuri

Try with sudo

sudo npm install -g angular-cli

hassanasad avatar Oct 21 '16 16:10 hassanasad

Update npm to v3.10.9 then try this:

npm install -g -f angular-cli

It's worked for me.

mahyari avatar Oct 21 '16 16:10 mahyari

@mahyari It is giving me this error: $ npm install -g -f angular-cli npm WARN using --force I sure hope you know what you are doing. npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! registry error parsing json npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\mainuser\AppData \Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "-g" "-f" "angular -cli" npm ERR! node v6.9.1 npm ERR! npm v3.10.9

npm ERR! Unexpected token < in JSON at position 1 npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! 503 first byte timeout npm ERR! npm ERR! npm ERR!

Error 503 first byte timeout

npm ERR!

first byte timeout

npm ERR!

Guru Mediation:

npm ERR!

Details: cache-jfk8122-JFK 1477069648 714958144

npm ERR!
npm ERR!

Varnish cache server

npm ERR! npm ERR! npm ERR! npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request: npm ERR! C:\Users\mainuser\npm-debug.log

anupamarachuri avatar Oct 21 '16 17:10 anupamarachuri

@hassanasad sudo does not work as mine is Windows GIT

anupamarachuri avatar Oct 21 '16 17:10 anupamarachuri

@anupamarachuri Please check the #2807 , clean the cache and try again with -f argument. You can try to install beta.17 for testing.

mahyari avatar Oct 21 '16 17:10 mahyari

Just a thought, are you connecting to internet via a proxy? If so you could try some of the solutions mentioned here http://stackoverflow.com/questions/7559648/is-there-a-way-to-make-npm-install-the-command-to-work-behind-proxy

praseetht avatar Oct 21 '16 19:10 praseetht

This is your real original error:

npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\mainuser\AppData\Roaming\npm\node_modules\angular-cli' -> 'C:\Users\mainuser\AppData\Roaming\npm\node_modules.angula r-cli.DELETE'

You seem to either not have access to that folder, or it is opened somewhere. You also might have broken cache, in which case npm cache clean might help.

Either way there are NPM problems, not CLI problems. You should open an issue in https://github.com/npm/npm/issues instead.

filipesilva avatar Oct 27 '16 15:10 filipesilva

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.