Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node Sass could not find a binding for your current environment #2588

Closed
Nixon-Joseph opened this issue Jan 31, 2019 · 2 comments
Closed

Node Sass could not find a binding for your current environment #2588

Nixon-Joseph opened this issue Jan 31, 2019 · 2 comments

Comments

@Nixon-Joseph
Copy link

Having an issue when trying to hook up sass to my .net project using gulp. I've installed node-sass via dependency on gulp-sass.

my gulpfile.js currently consists of:

var gulp = require("gulp"),
    sass = require("gulp-sass");


gulp.task("sass", function () {
    return gulp.src('wwwroot/*.scss')
        .pipe(sass())
        .pipe(gulp.dest('wwwroot/css'));
});

But any time I try to view my tasks, it makes this error:

Error: Missing binding [project]\node_modules\node-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
Found bindings for the following environments:
  - Windows 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
    at module.exports ([project]\node_modules\node-sass\lib\binding.js:15:13)
    at Object.<anonymous> ([project]\node_modules\node-sass\lib\index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> ([project]\node_modules\gulp-sass\index.js:162:21)

It looks like it's assuming I'm using node 10, but as you can see below, I'm running node 8. I've tried running npm rebuild node-sass to no avail.

I saw this issues - #2460 and #2536 - but wasn't really able to glean anything useful from them.

Any help would be appreciated, thanks!

  • NPM version (npm -v): 6.7.0
  • Node version (node -v): 8.11.3
  • Node Process (node -p process.versions):
  node: '8.11.3',
  v8: '6.2.414.54',
  uv: '1.19.1',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  modules: '57',
  nghttp2: '1.32.0',
  napi: '3',
  openssl: '1.0.2o',
  icu: '60.1',
  unicode: '10.0',
  cldr: '32.0',
  tz: '2017c' }
  • Node Platform (node -p process.platform): win32
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
node-sass       4.11.0  (Wrapper)       [JavaScript]
libsass         3.5.4   (Sass Compiler) [C/C++]
  • npm node-sass versions (npm ls node-sass):
`-- gulp-sass@4.0.2
  `-- node-sass@4.11.0
@nschonni
Copy link
Contributor

The 64-64 means it's being invoked from a Node 10 environment https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick-guide-for-minimium-support
You mght be using something like NVM, or if running from Visual Studio the version that the bundle and put in your PATH.
This isn't something we can help you debug

@Nixon-Joseph
Copy link
Author

I wasn't running NVM, but I just updated my local node.js to latest (v10), and re-installed my node packages, and I'm no longer getting the error.

Thank you for responding so quickly, even though you weren't able to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants