So, it seems after updating brackets.io, I can no longer run a script that compiles my sass code using node-sass. I'm still new to this so bear with me.
Here is the error file when I try to npm run the script:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Tad\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'compile:sass' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precompile:sass', 'compile:sass', 'postcompile:sass' ]
5 info lifecycle [email protected]~precompile:sass: [email protected]
6 info lifecycle [email protected]~compile:sass: [email protected]
7 verbose lifecycle [email protected]~compile:sass: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~compile:sass: PATH: C:\Users\Tad\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Tad\Desktop\starter\node_modules\.bin;C:\Program Files\ImageMagick-7.0.5-Q16;C:\Python27\;C:\Python27\Scripts;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Brackets\command;C:\Users\Tad\AppData\Roaming\npm
9 verbose lifecycle [email protected]~compile:sass: CWD: C:\Users\Tad\Desktop\starter
10 silly lifecycle [email protected]~compile:sass: Args: [ '/d /s /c', 'node-sass sass/main.scss css/style.css -w' ]
11 silly lifecycle [email protected]~compile:sass: Returned: code: 3221225786 signal: null
12 info lifecycle [email protected]~compile:sass: Failed to exec compile:sass script
13 verbose stack Error: [email protected] compile:sass: `node-sass sass/main.scss css/style.css -w`
13 verbose stack Exit status 3221225786
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Tad\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:283: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.<anonymous> (C:\Users\Tad\AppData\Roaming\npm\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 [email protected]
15 verbose cwd C:\Users\Tad\Desktop\starter
16 verbose Windows_NT 6.1.7601
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Tad\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "compile:sass"
18 verbose node v8.11.1
19 verbose npm v6.0.0
20 error code ELIFECYCLE
21 error errno 3221225786
22 error [email protected] compile:sass: `node-sass sass/main.scss css/style.css -w`
22 error Exit status 3221225786
23 error Failed at the [email protected] compile:sass script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 3221225786, true ]
And when I tried to npm rebuild node-sass -force:
gyp ERR! build error
gyp ERR! stack Error: Command failed: reg query "HKLM\Software\Microsoft\MSBuild \ToolsVersions" /s /reg:32
gyp ERR! stack 'reg' is not recognized as an internal or external command,
gyp ERR! stack operable program or batch file.
gyp ERR! stack gyp ERR! stack Can't find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?
gyp ERR! stack at C:\Users\Tad\Desktop\starter\node_modules\node-gyp\lib\bui ld.js:138:25
gyp ERR! stack at ChildProcess.exithandler (child_process.js:282:5)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:209:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Tad\\Desktop\ \starter\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--lib sass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Tad\Desktop\starter\node_modules\node-sass
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok Build failed with error code:
I have MS VS 2008+, and I downloaded the MS Build Tools 2015 thinking that may help, but it still doesn't work.
Also, if there is no easy fix, do I just remove node-sass from my project manually and then reinstall it?
Any help would be greatly appreciated.
It happen to me once on office workstation, and if I remember correctly this command did it for me
npm install --global --production windows-build-tools
This is the github issue page for windows build trouble https://github.com/sass/node-sass/issues/2074