Thursday, 16 March 2017

node-sass is downloading binaries for version 4.x even when nvm is on 6.9.0

I'm trying to migrate from node 4.4.5 to 6.9.0(npm 3.10.8). I removed my node_modules directory, did nvm install 6.9.0 and did npm install. This went fine. But when I try to build my project with gulp, it gives me the following error

Error: Missing binding /home/ubuntu/web/node_modules/node-sass/vendor/linux-x64-48/binding.node

Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 6.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 4.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
at module.exports (/home/ubuntu/web/node_modules/node-sass/lib/binding.js:15:13)
at Object.<anonymous> (/home/ubuntu/web/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/ubuntu/web/node_modules/gulp-sass/index.js:187:21)

Then I did npm rebuild node-sass. This did not download any new binary.

> node-sass@3.13.1 install /home/ubuntu/web/node_modules/node-sass 
> node scripts/install.js

node-sass build Binary found at /home/ubuntu/web/node_modules/node-sass/vendor/linux-x64-46/binding.node

> node-sass@3.13.1 postinstall /home/ubuntu/web/node_modules/node-sass
> node scripts/build.js

Binary found at /home/ubuntu/web/node_modules/node-sass/vendor/linux-x64-46/binding.node
Testing binary
Binary is fine

I tried building again but ended up with the first error again. Please help.



via Jophin Joseph

No comments:

Post a Comment