my global ng version is 1.6.1 and local ng-cli version is 1.6.1 so first warning then i got error,
ERROR in ./src/app/app.component.scss Module build failed: Error: Cannot find module 'node-sass' so anyone can help me ?
my global ng version is 1.6.1 and local ng-cli version is 1.6.1 so first warning then i got error,
ERROR in ./src/app/app.component.scss Module build failed: Error: Cannot find module 'node-sass' so anyone can help me ?
It seems that the node-sass has not been fetched on your desktop when you initiated your angular environment. This probably happened when you launched npm install -g @angular/cli.
If you are working in an enterprise context, using
then you may encounter this issue.
Explanation:
node-sass uses compiled C libs that are stored in Github. Your local repository manager (a.k.a. Nexus) should not be able to handle such a dependency.
Sollution:
If you are allowed to get out of your enterprise through the proxy, then you should configure the proxy in your .npmrc file (it should not be difficult to find a tuto that explains how). Then relaunch npm install -g @angular/cli.
If you are not allowed to get out of your enterprise through the web proxy, then your only sollution is to ask your Software Factory manager to package this npm module for you, including the C lib dependency.
Note that the situation that i just describe is not uncommon with npm packages.