Gabriel social
Gabriel social

Reputation: 9

Error in node packages and node-sass

I'm receiving this error in javascript console. I already remove the node_modules and reinstall it and I already run npm rebuild node-sass. I really don't know what to do anymore. I'll be very grateful for your help.

app.js:20147 Uncaught Error: Module build failed: ModuleBuildError: Module 

build failed: Error: Missing binding /home/vagrant/Quality1/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x

Found bindings for the following environments:
  - Windows 32-bit with Node.js 6.x
  - Windows 64-bit with Node.js 6.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
    at module.exports (/home/vagrant/Quality1/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/home/vagrant/Quality1/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/vagrant/Quality1/node_modules/sass-loader/index.js:4:12)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)

npm rebuild node-sass --force (response)

make: Leaving directory/home/vagrant/Quality1/node_modules/node-sass/build' gyp info ok Installed to /home/vagrant/Quality1/node_modules/node-sass/vendor/linux-x64-57/binding.node

[email protected] install /home/vagrant/Quality1/node_modules/gulp-sass/node_modules/node-sass node scripts/install.js

node-sass build Binary found at /home/vagrant/Quality1/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-57/binding.node

[email protected] postinstall /home/vagrant/Quality1/node_modules/gulp-sass/node_modules/node-sass node scripts/build.js

Binary found at /home/vagrant/Quality1/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-57/binding.node Testing binary Binary is fine [email protected] /home/vagrant/Quality1/node_modules/node-sass [email protected] /home/vagrant/Quality1/node_modules/gulp-sass/node_modules/node-sass `

Upvotes: 0

Views: 6750

Answers (2)

Chandan Satapathi
Chandan Satapathi

Reputation: 21

change "gulp-sass": "^2.3.2" to "gulp-sass": "3.0.0" in package.json

clear the node_modules folder by removing it and then run

npm install

again and it'll not give the error!

Upvotes: 2

Pawel Zentala
Pawel Zentala

Reputation: 191

You are using [email protected]. There was never support for Node 8 for that version.

You can solve this problem in two ways:

  1. Use [email protected] or higher (currently the latest one is 4.7.2). Sometimes node-sass is the dependency of another package, then try to update this package.
  2. Use Node 6. The easiest way to manage different versions of Node between your projects is to use NVM or NVM Windows. I also suggest you use .nvmrc file, that contains desired Node version. Then you will be able to switch between Node version with simply $ nvm use in a project directory.

Upvotes: 1

Related Questions