Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular CLI New project creation issue #4429

Closed
BikashDas19 opened this issue Feb 4, 2017 · 7 comments · Fixed by #5282
Closed

Angular CLI New project creation issue #4429

BikashDas19 opened this issue Feb 4, 2017 · 7 comments · Fixed by #5282
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix type: faq

Comments

@BikashDas19
Copy link

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 node-sass@4.5.0 postinstall: node scripts/build.js
6228 error Exit status 1
6229 error Failed at the node-sass@4.5.0 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.

@M-Abozaid
Copy link

M-Abozaid commented Feb 6, 2017

I have the same issue on Linux Ubuntu

@leclercJulien
Copy link

leclercJulien commented Feb 11, 2017

+1 with Ubuntu 14.04

@filipesilva
Copy link
Contributor

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

#5282 would fix it... in a way. It would let you use everything but sass.

@filipesilva
Copy link
Contributor

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.

@filipesilva filipesilva added the P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful label Mar 9, 2017
@hansl hansl added this to the 1.0 Final Blocking milestone Mar 16, 2017
filipesilva added a commit that referenced this issue Mar 16, 2017
This change should reduce the amount of problems on npm installs.

It makes the `node-sass` dependency optional, and so install will not fail when it cannot be installed.

For projects that do not use sass, there is no side-effect of an failed node-sass install.

For projects that do use node-sass and the install failed, they should see the following self-explanatory error message:

```
ERROR in ./src/app/app.component.scss
Module build failed: Error: Missing binding D:\sandbox\master-project\node_modules\node-sass\vendor\win32-x64-51\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 7.x

Found bindings for the following environments:

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
    at module.exports (D:\sandbox\master-project\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> (D:\sandbox\master-project\node_modules\node-sass\lib\index.js:14:35)
```

Fix #4429
@filipesilva
Copy link
Contributor

There seems to be a workaround for Chinese users, courtesy of @aijingsun6 in #5360 (comment):

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

@pernambucano
Copy link

pernambucano commented Mar 16, 2018

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

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix type: faq
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants