node-sass missing linux-x64 bindings

Created on 15 Nov 2016  路  5Comments  路  Source: sass/node-sass

Summary of issue:

A fresh install of node-sass as a npm dependency (I'm using yarn) results in a failure to be able to actually use the node-sass module, as can be seen below: node -p "require('node-sass').info" fails.

When reporting an bug, you must provide this information:

  • NPM version (npm -v): 3.10.9
  • Node version (node -v): v7.1.0
  • Node Process (node -p process.versions):
{ http_parser: '2.7.0',
  node: '7.1.0',
  v8: '5.4.500.36',
  uv: '1.10.0',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  modules: '51',
  openssl: '1.0.2j',
  icu: '58.1',
  unicode: '9.0',
  cldr: '30.0.2',
  tz: '2016g' }
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
/app/webapp/node_modules/node-sass/lib/binding.js:15
      throw new Error(errors.missingBinary());
      ^

Error: Missing binding /app/webapp/node_modules/node-sass/vendor/linux-x64-51/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 7.x

Found bindings for the following environments:
  - OS X 64-bit with Node.js 6.x
  - OS X 64-bit with Node.js 7.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 (/app/webapp/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/app/webapp/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at [eval]:1:1
  • npm node-sass versions (npm ls node-sass):
[email protected] /app/webapp
`-- [email protected]

If you delete this text without following it, your issue will be closed.

Most helpful comment

Meh, turns out my original Dockerfile was accidentally copying a node-modules directory, so I think you're right, this is not an issue. Keep to closed. Sorry for the noise.

All 5 comments

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.

The error message is telling you what happened, and how to fix it

Yes, fixing it is easy and not what this issue is about. But are you saying that "yarn install" is expected to _not_ result in a node-sass that works? I was expecting it work. I think you are saying that the expected way to use node-sass is to include in packages, run install, and the run rebuild to make sure it works? That doesn't sounds right to me...?

Yarn is just calling NPM, so if you're changing OS (likely running this from a container) the behaviour is the same. If you can reproduce this in a clean folder in a reproducable form, then it's something to look at. There are several reports that something in the latest yarn broke some installs, so you might want to read those issues first

Yeah, I've been doing this in a clean container environment. Would you like me to upload a minimal Dockerfile to demo the issue?

Meh, turns out my original Dockerfile was accidentally copying a node-modules directory, so I think you're right, this is not an issue. Keep to closed. Sorry for the noise.

Was this page helpful?
0 / 5 - 0 ratings