Angular-cli: Angular CLI New project creation issue

Created on 4 Feb 2017  路  7Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 7,

Versions.

angular-cli: 1.0.0-beta.28.3
node: 6.9.5
os: win32 x64

Repro steps.

After running the command "ng new MyTestProject", I am getting the below error.

The log given by the failure.

6223 error Windows_NT 6.1.7601
6224 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-sass"
6225 error node v6.9.5
6226 error npm v3.10.10
6227 error code ELIFECYCLE
6228 error [email protected] postinstall: node scripts/build.js
6228 error Exit status 1
6229 error Failed at the [email protected] postinstall script 'node scripts/build.js'.
6229 error Make sure you have the latest version of node.js and npm installed.
6229 error If you do, this is most likely a problem with the node-sass package,
6229 error not with npm itself.
6229 error Tell the author that this fails on your system:
6229 error node scripts/build.js
6229 error You can get information on how to open an issue for this project with:
6229 error npm bugs node-sass
6229 error Or if that isn't available, you can get their info via:
6229 error npm owner ls node-sass
6229 error There is likely additional logging output above.
6230 verbose exit [ 1, true ]

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

1 (urgent) bufix faq

Most helpful comment

If you are like me, and had this problem on one of the ubuntu instances in an EC2, installing node doing this helped me:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

All 7 comments

I have the same issue on Linux Ubuntu

+1 with Ubuntu 14.04

This stems from some incompatibility between node-sass and your system.

https://github.com/angular/angular-cli/pull/5282 would fix it... in a way. It would let you use everything but sass.

One advise I can give for now is that you can actually force an install.

This isn't usually a good idea, and even npm will tell you so:

kamik@T460p MINGW64 /d/sandbox/master-project (master)
$ npm install --force
npm WARN using --force I sure hope you know what you are doing.

But it can bypass the node-sass issues. You'll have a broken node-sass install but everything else will still work.

There seems to be a workaround for Chinese users, courtesy of @aijingsun6 in https://github.com/angular/angular-cli/issues/5360#issuecomment-285601458:

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

If you are like me, and had this problem on one of the ubuntu instances in an EC2, installing node doing this helped me:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

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._

Was this page helpful?
0 / 5 - 0 ratings