Error starting gulp-sass after upgrading to Node v4.0.0

I upgraded to Node v4.0.0, and after I started gulp in my projects, I got an error regarding gulp -sass / node -sass, as shown below:

Error: libsass bindings not found. Try reinstalling node-sass ?

I tried to destroy all Node modules in the project and reinstall, and I get some errors:

npm WARN package.json package@0.0.0 No repository field.

npm WARN package.json package@0.0.0 No license field.

npm WARN is deprecated CSSselect@0.4.1 : the module is now available as 'css-select'

npm WARN is deprecated CSSwhat@0.4.7 : the module is now available as "css-what"

npm WARN is deprecated pangyp@2.3.2 : use node -gyp @ 3 +, it does everything

-

node -sass@2.1.1 install / Users / Jonathan / Documents / sites / wkux / ct-html-lib / node_modules / gulp -sass / node_modules / node-sass

node scripts / install.js

Unable to download file from https://raw.githubusercontent.com/sass/node-sass-binaries/v2.1.1/darwin-x64-node-4.0/binding.node

node -sass@2.1.1 postinstall / Users / Jonathan / Documents / sites / wkux / ct-html-lib / node_modules / gulp -sass / node_modules / node-sass

node scripts / build.js

gyp: /Users/Jonathan/.node-gyp/4.0.0/common.gypi not found (cwd: / Users / Jonathan / Documents / sites / wkux / ct-html-lib / node_modules / gulp -sass / node_modules / node -sass), while reading includes binding.gyp when trying to load binding.gyp

gyp ERR! configuration error

gyp ERR! stack Error: gyp failed with exit code: 1

gyp ERR! stack in ChildProcess.onCpExit (/ Users / Jonathan / Documents / sites / wkux / ct-html-lib / node_modules / gulp -sass / node_modules / node-sass / node_modules / pangyp / lib / configure.js: 346: 16)

gyp ERR! stack in emitTwo (events.js: 87: 13)

gyp ERR! stack in ChildProcess.emit (events.js: 172: 7)

gyp ERR! stack in Process.ChildProcess._handle.onexit (internal / child_process.js: 200: 12)

gyp ERR! Darwin system 14.5.0

gyp ERR! command "/ usr / local / bin / node" "/ Users / Jonathan / Documents / sites / wkux / ct-html-lib / node_modules / gulp -sass / node_modules / node-sass / node_modules / pangyp / bin / node -gyp "" rebuild "

gyp ERR! cwd / Users / Jonathan / Documents / sites / wkux / ct-html-lib / node_modules / gulp -sass / node_modules / node-sass

gyp ERR! Node -v v4.0.0

gyp ERR! pangyp -v v2.3.2

gyp ERR! not ok

Build failed

All other Node modules seem to be installed normally. This is something with node-sass, which is in gulp-sass, which causes problems.

+5
source share
1 answer

Delete the node_modules folder, update gulp-sass to the latest version of your package.json, which is located in 2.2.0 , and run npm install again.

+21
source

All Articles