angular-cli: Unable to install angular cli through npm

Please provide us with the following information:

I have executed the command npm install -g @angular/cli in cmd prompt as an Admin

OS?

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

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here: npm -v 4.3.0 node -v v6.9.5

Repro steps.

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

The log given by the failure.

Normally this include a stack trace and some more information. 99465 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules@angular\cli\node_modules\chokidar\node_modules\fsevents): 99466 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”}) 99467 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 99467 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 99467 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32 99467 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 99468 verbose stack Error: node-sass@4.5.0 postinstall: node scripts/build.js 99468 verbose stack Exit status 1 99468 verbose stack at EventEmitter.<anonymous> (C:\Users\Ravikumar_Pilla\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:279:16) 99468 verbose stack at emitTwo (events.js:106:13) 99468 verbose stack at EventEmitter.emit (events.js:191:7) 99468 verbose stack at ChildProcess.<anonymous> (C:\Users\Ravikumar_Pilla\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:40:14) 99468 verbose stack at emitTwo (events.js:106:13) 99468 verbose stack at ChildProcess.emit (events.js:191:7) 99468 verbose stack at maybeClose (internal/child_process.js:877:16) 99468 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 99469 verbose pkgid node-sass@4.5.0 99470 verbose cwd C:\Users\Ravikumar_Pilla\AppData\Roaming\npm\node_modules 99471 error Windows_NT 10.0.10586 99472 error argv “C:\Program Files (x86)\nodejs\node.exe” “C:\Users\Ravikumar_Pilla\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js” “install” “-g” “@angular/cli” 99473 error node v6.9.5 99474 error npm v4.3.0 99475 error code ELIFECYCLE 99476 error errno 1 99477 error node-sass@4.5.0 postinstall: node scripts/build.js 99477 error Exit status 1 99478 error Failed at the node-sass@4.5.0 postinstall script ‘node scripts/build.js’. 99478 error Make sure you have the latest version of node.js and npm installed. 99478 error If you do, this is most likely a problem with the node-sass package, 99478 error not with npm itself. 99478 error Tell the author that this fails on your system: 99478 error node scripts/build.js 99478 error You can get information on how to open an issue for this project with: 99478 error npm bugs node-sass 99478 error Or if that isn’t available, you can get their info via: 99478 error npm owner ls node-sass 99478 error There is likely additional logging output above. 99479 verbose exit [ 1, true ]

Mention any other details that might be useful.

gyp verb check python checking for Python executable “python2.7” in the PATH gyp verb which failed Error: not found: python2.7

I am getting node-sass error in addition to the python error I copied here. After this post-install is showing

npm ERR! node-sass@4.5.0 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.5.0 postinstall script ‘node scripts/build.js’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the node-sass package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node scripts/build.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-sass npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls node-sass npm ERR! There is likely additional logging output above.


Thanks! We’ll be in touch soon.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (1 by maintainers)

Most upvoted comments

If you don’t know how to set up angular cli in your machine. go ahead and watch this video. hope it helps you

https://youtu.be/Mu6btqWZszg

Hi, I installed the angular cli using the git bash

but it throws me an error like this after the npm install -g @angular/cli it gives like this result below: $ npm install -g @angular/cli npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-THTy2psb7CEKttcOxfVtnw1DrllArQ0B+tpie5sMOdH8q9wLBrCdTpOFC35bj+2b+vaqELWnDo2dXE+CxkGLhg== integrity checksum failed when using sha512: wanted sha512-THTy2psb7CEKttcOxfVtnw1DrllArQ0B+tpie5sMOdH8q9wLBrCdTpOFC35bj+2b+vaqELWnDo2dXE+CxkGLhg== but got sha512-/wH+1ZlLSnGRkQHyXh5NQ70Q/4o3gQp9AMliNVwr7XqmEBuPLW1EEb4+NwktnUP0A5alpbE6nW6BIroNTOIF9Q==. (307031 bytes) npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation. npm ERR! code EINTEGRITY npm ERR! errno EINTEGRITY npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/@angular%2Fcli: Integrity verification failed for sha512-THTy2psb7CEKttcOxfVtnw1DrllArQ0B+tpie5sMOdH8q9wLBrCdTpOFC35bj+2b+vaqELWnDo2dXE+CxkGLhg== (C:\Users\Edoves\AppData\Roaming\npm-cache_cacache\content-v2\sha512\4c\74\f2da9b1bec210ab6d70ec5f56d9f0d43ae5940ad0d01fada627b9b0c39d1fcabdc0b06b09d4e93850b7e5b8fed9bfaf6aa10b5a70e8d9d5c4f82c6418b86)

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Edoves\AppData\Roaming\npm-cache_logs\2018-09-23T04_16_43_930Z-debug.log

have you experienced this too? can someone help me with this issue thanks in advance guys 😃

@praveenbommali did you manage to solve the issue, because I’m stuck with the very same problem? i13 cimgpsh_orig

I’m not finding any work around for the following , Failed to install @angular/cli using npm

Error:

C:\ui>npm install -g -f @angular/cli npm WARN using --force I sure hope you know what you are doing. [ …] \ fetchMetadata: sill resolveWithNewModule chokidar@1.7.0 checking installable status

even I tried without -f still getting issue
As per the forum suggestion , tried

npm uninstall -g @angular/cli npm cache clean
npm cache verify
npm install -g @angular/cli

Even I try to install externally chokidar package , even it is not resolved . Please help me out.

My current Node : 8.6.0 npm : 5.3.0

Even I tried with latest node version also, issue not resolved