npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

NPM: compile sass into css

I want to ask for some help.
I`ve installed npm, and npm-sass package. Now I try to compile “SASS” code into “CSS”.
But always receive a bulk of errors.

So what i have:

  1. Main.scss
  2. Empty CSS.file
  3. script in package.json for compilation scss to css:
    “scripts”: {
    “compile:sass”: “node-sass sass/main.scss css/style.css”
  4. Run command in cmdr: “npm run compile:sass”
  5. Received bunch of errors:
    npm ERR! code ELIFECYCLE
    npm ERR! errno 3221226505
    npm ERR! natours@1.0.0 compile:sass: node-sass sass/main.scss css/style.css
    npm ERR! Exit status 3221226505
    npm ERR!
    npm ERR! Failed at the natours@1.0.0 compile:sass script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\100051512\AppData\Roaming\npm-cache_logs\2018-08-16T13_35_02_516Z-debug.log

AND this is information from .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 ‘compile:sass’ ]
2 info using npm@5.6.0
3 info using node@v8.11.4
4 verbose run-script [ ‘precompile:sass’, ‘compile:sass’, ‘postcompile:sass’ ]
5 info lifecycle natours@1.0.0~precompile:sass: natours@1.0.0
6 info lifecycle natours@1.0.0~compile:sass: natours@1.0.0
7 verbose lifecycle natours@1.0.0~compile:sass: unsafe-perm in lifecycle true
8 verbose lifecycle natours@1.0.0~compile:sass: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\100051512\Desktop\GitHub\Natours\node_modules.bin;C:\Users\100051512\Desktop\GitHub\cmder\bin;C:\Users\100051512\Desktop\GitHub\cmder\vendor\conemu-maximus5\ConEmu\Scripts;C:\Users\100051512\Desktop\GitHub\cmder\vendor\conemu-maximus5;C:\Users\100051512\Desktop\GitHub\cmder\vendor\conemu-maximus5\ConEmu;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files (x86)\Cisco\Cisco AnyConnect Secure Mobility Client;C:\Program Files (x86)\Sennheiser\SoftphoneSDK;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\Program Files (x86)\Skype\Phone;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\dotnet;C:\Program Files\Git\cmd;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs;C:\Users\100051512\AppData\Local\Microsoft\WindowsApps;C:\Users\100051512\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\100051512\AppData\Roaming\npm;C:\Program Files\Git\mingw64;C:\Program Files\Git\usr\bin;C:\Users\100051512\Desktop\GitHub\cmder
9 verbose lifecycle natours@1.0.0~compile:sass: CWD: C:\Users\100051512\Desktop\GitHub\Natours
10 silly lifecycle natours@1.0.0~compile:sass: Args: [ ‘/d /s /c’, ‘node-sass sass/main.scss css/style.css’ ]
11 silly lifecycle natours@1.0.0~compile:sass: Returned: code: 3221226505 signal: null
12 info lifecycle natours@1.0.0~compile:sass: Failed to exec compile:sass script
13 verbose stack Error: natours@1.0.0 compile:sass: node-sass sass/main.scss css/style.css
13 verbose stack Exit status 3221226505
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
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 emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid natours@1.0.0
15 verbose cwd C:\Users\100051512\Desktop\GitHub\Natours
16 verbose Windows_NT 10.0.14393
17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “compile:sass”
18 verbose node v8.11.4
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 3221226505
22 error natours@1.0.0 compile:sass: node-sass sass/main.scss css/style.css
22 error Exit status 3221226505
23 error Failed at the natours@1.0.0 compile:sass script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221226505, true ]

Please help to solve this issue.

Thank you in advance.