2
votes

I'm getting following error while build my project. Actually error says "Missing binding /myproject/node_modules/node-sass/vendor/linux-x64-57/binding.node", but i have "Missing binding /myproject/node_modules/node-sass/vendor/linux-x64-48/binding.node". I don't know Why it is not refering "linux-x64-48"?

Error says Run npm rebuild node-sass --force, i did so but no luck. Please help me git rid of this issue.

node version: v8.9.1

npm: 5.5.1

Note: I even tried by removing entire node_modules and reinstalled(npm install) it. But still getting same error.

ERROR in ./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-6ef6ca5e","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0&bustCache!./src/components/UserProfile.vue
Module build failed: Error: Missing binding /myproject/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:
  - Linux 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 (/myproject/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/myproject/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/myproject/node_modules/sass-loader/lib/loader.js:3:14)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
 @ ./node_modules/vue-style-loader!./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-6ef6ca5e","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/lib/loader.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0&bustCache!./src/components/MyProfile.vue 4:14-346 13:3-17:5 14:22-354
 @ ./src/components/UserProfile.vue
 @ ./src/router.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/assets/scss/main.scss
Module build failed: Error: Missing binding /myproject/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:
  - Linux 64-bit with Node.js 6.x
3

3 Answers

4
votes

This issue is been resolved by npm rebuild node-sass, github issue

1
votes

This usually happens when the environment changes rapidly (copying sass file to one location to another) This will help you to solve this issue.

npm install

npm rebuild node-sass --force
0
votes

This could be due to the node version mismatch on your machine and your application is expecting. In my case while building a docker image the version on base machine and on docker image were different.