Reputation: 257
I've installed node-sass v4.12.0 but when I do an npm i, it uses the 4.9.4 for some reason. I don't know where it gets de 4.9.4 from, because in my package.json I use the 4.12.0.
My node-version: 12.3.1
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\OneHipFrontend\\Development\\Code\\Client\\OneHip.Web\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags="
"--libsass_library="
gyp ERR! cwd C:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\@angular-devkit\build-angular\node_modules\node-sass
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
c:\onehipfrontend\development\code\client\onehip.web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\src\create_string.cpp(17): error C2664: 'v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)': cannot convert argument 1 from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value &' [C:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\build\binding.vcxproj]
c:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\build\binding.sln" (default target) (1) -> c:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\build\binding.vcxproj.metaproj" (default target) (2) ->c:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\build\binding.vcxproj" (default target) (4) -> (ClCompile target) -> c:\onehipfrontend\development\code\client\onehip.web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\src\create_string.cpp(17): error C2664: 'v8::String::Utf8Value::Utf8Value(const v8::String::Utf8Value &)': cannot convert argument 1 from 'v8::Local<v8::Value>' to 'const v8::String::Utf8Value &' [C:\OneHipFrontend\Development\Code\Client\OneHip.Web\node_modules\@angular-devkit\build-angular\node_modules\node-sass\build\binding.vcxproj]
Things I've tried:
Nothing worked so far
Upvotes: 3
Views: 10140
Reputation: 257
My problem was solved by installing nodeJs version 11.0.15. After I did this, my "npm install" works without a problem.
Upvotes: 3
Reputation: 4129
From the folder, it looks like the old version is a dependency from https://www.npmjs.com/package/@angular-devkit/build-angular, but I don't see an explicit mention of node-sass in the dependencies. If the sub-dependency is pinned to node-sass 4.9.4, the highest version of Node that will be compatible is Node 10 https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick-guide-for-minimium-support
Upvotes: 1