Skip to content

Unable to install angular cli through npm #5296

Closed
@Ravi479

Description

@Ravi479

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 [email protected]: 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: [email protected] postinstall: node scripts/build.js
99468 verbose stack Exit status 1
99468 verbose stack at EventEmitter. (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. (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 [email protected]
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 [email protected] postinstall: node scripts/build.js
99477 error Exit status 1
99478 error Failed at the [email protected] 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! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions