This is probably not a problem with npm. There is likely additional logging output above.


Hello everyone I am new using npm.
I want to compile a sass file so that i can use it in my webpage.
Here is the error i am getting. I don’t understand what it is trying to say. If you can suggest some help.

Here is the log file.
0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘sass’ ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ ‘presass’, ‘sass’, ‘postsass’ ]
5 info lifecycle modern_portfolio@1.0.0~presass: modern_portfolio@1.0.0
6 info lifecycle modern_portfolio@1.0.0~sass: modern_portfolio@1.0.0
7 verbose lifecycle modern_portfolio@1.0.0~sass: unsafe-perm in lifecycle true
8 verbose lifecycle modern_portfolio@1.0.0~sass: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Admin\modern_portfolio\node_modules.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jre1.8.0_201;C:\Program Files\Java\jdk-12\bin;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;E:\Flutter\flutter\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\SourceGear\Common\DiffMerge;C:\Program Files\nodejs;E:\Git\cmd;E:\Git\mingw64\bin;E:\Git\usr\bin;“C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java\jdk11\bin;C:\Program Files\Java\jre192\bin;C:\Program Files\Java\jdk-11.0.1\bin;C:\Users\Admin\AppData\Local\Programs\Python\Python37”;C:\Users\Admin\AppData\Local\atom\bin;C:\Program Files\Java\jre1.8.0_201;C:\Users\Admin\AppData\Local\Programs\Python\Python37;C:\Users\Admin\AppData\Local\Programs\Python;E:\IntelliJ IDEA Community Edition 2018.3.5\bin;;E:\Flutter\flutter\bin;E:\sdk\tools;E:\sdk\platform-tools;E:\Git 2\Git\bin;E:\Git 2\Git\cmd;C:\Program Files\Java\jdk-12\bin;C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\nasm32\nasm-2.11.09rc1;C:\Users\Admin\AppData\Roaming\npm;C:\Program Files\JetBrains\PyCharm 2019.2.3\bin;;C:\php;
9 verbose lifecycle modern_portfolio@1.0.0~sass: CWD: C:\Users\Admin\modern_portfolio
10 silly lifecycle modern_portfolio@1.0.0~sass: Args: [ ‘/d /s /c’, ‘node-sass -w scss/ -o dist/css/ --recursive’ ]
11 silly lifecycle modern_portfolio@1.0.0~sass: Returned: code: 1 signal: null
12 info lifecycle modern_portfolio@1.0.0~sass: Failed to exec sass script
13 verbose stack Error: modern_portfolio@1.0.0 sass: node-sass -w scss/ -o dist/css/ --recursive
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid modern_portfolio@1.0.0
15 verbose cwd C:\Users\Admin\modern_portfolio
16 verbose Windows_NT 10.0.18362
17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “sass”
18 verbose node v10.16.3
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error modern_portfolio@1.0.0 sass: node-sass -w scss/ -o dist/css/ --recursive
22 error Exit status 1
23 error Failed at the modern_portfolio@1.0.0 sass script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

npm run sass

runs the npm script called sass, which runs

node-sass -w scss/ -o dist/css/ --recursive

and failed. You can run that command directly without going through npm to see everything it produces. Something like (I’m not on Windows so invocation might not be quite right):

./node_modules/.bin/node-sass -w scss/ -o dist/css/ --recursive

(Is node-sass actually installed? Have you run npm install?)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.