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

can not install angular cli

Open aijingsun6 opened this issue 9 years ago • 9 comments

can not install angular cli by cmd npm install -g @angular/cli

OS

CentOS release 6.5 (Final) (Linux 2.6.32-573.22.1.el6.x86_64)

Versions.

$ node -v $ v6.10.0 $ npm -v $ 3.10.10 $ tsc -v $ Version 2.2.1

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.

84621 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/@angular/cli/node_modules/chokidar/node_modules/fsevents): 84622 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 84623 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 84623 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 84623 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux 84623 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 84624 verbose stack Error: [email protected] postinstall: node scripts/build.js 84624 verbose stack Exit status 1 84624 verbose stack at EventEmitter. (/home/eco/lib/node-v6.10.0-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 84624 verbose stack at emitTwo (events.js:106:13) 84624 verbose stack at EventEmitter.emit (events.js:191:7) 84624 verbose stack at ChildProcess. (/home/eco/lib/node-v6.10.0-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:40:14) 84624 verbose stack at emitTwo (events.js:106:13) 84624 verbose stack at ChildProcess.emit (events.js:191:7) 84624 verbose stack at maybeClose (internal/child_process.js:877:16) 84624 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 84625 verbose pkgid [email protected] 84626 verbose cwd /home/eco 84627 error Linux 2.6.32-573.22.1.el6.x86_64 84628 error argv "/home/eco/lib/node-v6.10.0-linux-x64/bin/node" "/home/eco/lib/node-v6.10.0-linux-x64/bin/npm" "install" "-g" "@angular/cli" 84629 error node v6.10.0 84630 error npm v3.10.10 84631 error code ELIFECYCLE 84632 error [email protected] postinstall: node scripts/build.js 84632 error Exit status 1 84633 error Failed at the [email protected] postinstall script 'node scripts/build.js'. 84633 error Make sure you have the latest version of node.js and npm installed. 84633 error If you do, this is most likely a problem with the node-sass package, 84633 error not with npm itself. 84633 error Tell the author that this fails on your system: 84633 error node scripts/build.js 84633 error You can get information on how to open an issue for this project with: 84633 error npm bugs node-sass 84633 error Or if that isn't available, you can get their info via: 84633 error npm owner ls node-sass 84633 error There is likely additional logging output above. 84634 verbose exit [ 1, true ]

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

aijingsun6 avatar Mar 10 '17 05:03 aijingsun6

This is a problem with node-sass. Basically you need to install node-sass in the same environment than your running platform. Please remove node_module and run npm install again in your CentOS server.

AnthonyTsang avatar Mar 10 '17 06:03 AnthonyTsang

@AnthonyTsang thanks for your help; but I can't install node-sass in my server util now,the error log is the same as before.

aijingsun6 avatar Mar 10 '17 07:03 aijingsun6

@AnthonyTsang I found the solution: 1.add sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ to npmrc file 2.npm install -g @augular/cli

It works!! Thanks.

aijingsun6 avatar Mar 10 '17 07:03 aijingsun6

Welcome to China

AnthonyTsang avatar Mar 10 '17 07:03 AnthonyTsang

go ahead and watch this video. hope it helps you

https://youtu.be/Mu6btqWZszg

psks1204 avatar Mar 10 '17 11:03 psks1204

@aijingsun6 if you can install it at the end, maybe you should close this issue?

AnthonyTsang avatar Mar 13 '17 01:03 AnthonyTsang

Dupe of https://github.com/angular/angular-cli/issues/4429, kinda fixed on https://github.com/angular/angular-cli/pull/5282 for the next release.

@aijingsun6 I did not know that workaround for users in China, I will add it to the other issue!

@psks1204 I don't see how your video is related to this issue. It looks like you're just trying to publicize it on the issue tracker.

filipesilva avatar Mar 18 '17 00:03 filipesilva

@aijingsun6 it works for me.thanks

BlankHrt avatar Mar 18 '17 04:03 BlankHrt

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.