can not install angular cli
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.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.
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 thanks for your help; but I can't install node-sass in my server util now,the error log is the same as before.
@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.
Welcome to China
go ahead and watch this video. hope it helps you
https://youtu.be/Mu6btqWZszg
@aijingsun6 if you can install it at the end, maybe you should close this issue?
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.
@aijingsun6 it works for me.thanks
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.