I built a new project by using the command "ng new Client --style=scss --routing"
After that, I ran the command "ng add @angular/pwa"
Then I try to run "npm start"
it pops up the below messages:
ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.sassLoader (C:\xampp\htdocs\client\node_modules\sass-loader\lib\loader.js:46:72)
i ï½¢wdmï½£: Failed to compile.
I tried to use the command "npm install --unsafe-perm=true" then use "npm install node-sass"
still came out error message:
2319 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
2320 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2322 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\@angular-devkit\build-angular\node_modules\node-sass):
2323 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: node scripts/build.js
2323 warn optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2324 verbose optional SKIPPING OPTIONAL DEPENDENCY:
2324 verbose optional Failed at the [email protected] postinstall script.
2324 verbose optional SKIPPING OPTIONAL DEPENDENCY: This is probably not a problem with npm. There is likely additional logging output above.
2325 verbose stack Error: [email protected] postinstall: node scripts/build.js
2325 verbose stack Exit status 1
2325 verbose stack at EventEmitter.
2325 verbose stack at EventEmitter.emit (events.js:182:13)
2325 verbose stack at ChildProcess.
2325 verbose stack at ChildProcess.emit (events.js:182:13)
2325 verbose stack at maybeClose (internal/child_process.js:962:16)
2325 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
2326 verbose pkgid [email protected]
2327 verbose cwd C:\xampp\htdocs\client
2328 verbose Windows_NT 6.1.7601
2329 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-sass"
2330 verbose node v10.13.0
2331 verbose npm v6.4.1
2332 error code ELIFECYCLE
2333 error errno 1
2334 error [email protected] postinstall: node scripts/build.js
2334 error Exit status 1
2335 error Failed at the [email protected] postinstall script.
2335 error This is probably not a problem with npm. There is likely additional logging output above.
2336 verbose exit [ 1, true ]
Is there anyone know how to fix it?
@goseesomething your issue got transfered over, so you could you look at the issue template and provide the information we need https://raw.githubusercontent.com/sass/node-sass/master/.github/ISSUE_TEMPLATE/Bug_report.md
Try npm install node-sass --unsafe-perm=true
Regards,
Michael
On Tue, Nov 13, 2018 at 10:18 AM goseesomething notifications@github.com
wrote:
I built a new project by using the command "ng new Client --style=scss
--routing"
After that, I ran the command "ng add @angular/pwa"
Then I try to run "npm start"
it pops up the below messages:ERROR in ./src/styles.scss
(./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Cannot find module 'node-sass'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.sassLoader
(C:\xampp\htdocs\client\node_modules\sass-loader\lib\loader.js:46:72)
i ï½¢wdmï½£: Failed to compile.I tried to use the command "npm install --unsafe-perm=true" then use "npm
install node-sass"
still came out error message:2319 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
(node_modules\fsevents):
2320 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for
[email protected]: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32
2321 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2322 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
(node_modules@angular-devkit\build-angular\node_modules\node-sass):
2323 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
postinstall: node scripts/build.js
2323 warn optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2324 verbose optional SKIPPING OPTIONAL DEPENDENCY:
2324 verbose optional Failed at the [email protected] postinstall script.
2324 verbose optional SKIPPING OPTIONAL DEPENDENCY: This is probably not a
problem with npm. There is likely additional logging output above.
2325 verbose stack Error: [email protected] postinstall: node
scripts/build.js
2325 verbose stack Exit status 1
2325 verbose stack at EventEmitter. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
2325 verbose stack at EventEmitter.emit (events.js:182:13)
2325 verbose stack at ChildProcess. (C:\Program
Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
2325 verbose stack at ChildProcess.emit (events.js:182:13)
2325 verbose stack at maybeClose (internal/child_process.js:962:16)
2325 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:251:5)
2326 verbose pkgid [email protected]
2327 verbose cwd C:\xampp\htdocs\client
2328 verbose Windows_NT 6.1.7601
2329 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "node-sass"
2330 verbose node v10.13.0
2331 verbose npm v6.4.1
2332 error code ELIFECYCLE
2333 error errno 1
2334 error [email protected] postinstall: node scripts/build.js
2334 error Exit status 1
2335 error Failed at the [email protected] postinstall script.
2335 error This is probably not a problem with npm. There is likely
additional logging output above.
2336 verbose exit [ 1, true ]Is there anyone know how to fix it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/2544, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjZWNvsZuRMaXeHY7dea8zYlMmMh_GNks5uufGegaJpZM4Yahfu
.
I was getting a similar error, I tried using the --unsafe-perm=true and it worked. Here is the error I was getting.
2404 verbose Linux 4.15.0-39-generic
2405 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "i" "node-sass"
2406 verbose node v8.10.0
2407 verbose npm v6.4.1
2408 error code ELIFECYCLE
2409 error errno 1
2410 error [email protected] postinstall: node scripts/build.js
2410 error Exit status 1
2411 error Failed at the [email protected] postinstall script.
2411 error This is probably not a problem with npm. There is likely additional logging output above.
2412 verbose exit [ 1, true ]
Most helpful comment
Try npm install node-sass --unsafe-perm=true
Regards,
Michael
On Tue, Nov 13, 2018 at 10:18 AM goseesomething notifications@github.com
wrote: