dlmanning / gulp-sass

SASS plugin for gulp
MIT License
1.57k stars 381 forks source link

Outdated node-sass is incompatible with node 12 #759

Closed leo-cheron closed 4 years ago

leo-cheron commented 4 years ago

Hey,

The node-sass dependency needs to be updated as node-sass won't run with the current version of node (12+).

mmunchandersen commented 4 years ago

I'm getting this in Visual Studio 2019 16.5.0 when I do this in my Gulpfile.js (using "gulp": "4.0.2" and "gulp-sass": "4.0.2",:

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

Failed to run "C:\project-x\Gulpfile.js"... cmd.exe /c gulp --tasks-simple C:\project-x\node_modules\node-sass\lib\binding.js:13 throw new Error(errors.unsupportedEnvironment()); ^ Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (72) For more information on which environments are supported please see: https://github.com/sass/node-sass/releases/tag/v4.11.0 at module.exports (C:\project-x\node_modules\node-sass\lib\binding.js:13:13) at Object. (C:\project-x\node_modules\node-sass\lib\index.js:14:35) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) at Function.Module._load (internal/modules/cjs/loader.js:727:14) at Module.require (internal/modules/cjs/loader.js:852:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (C:\project-x\node_modules\gulp-sass\index.js:162:21) at Module._compile (internal/modules/cjs/loader.js:959:30)

harski commented 4 years ago

In my brief test, bumping the node-sass dependency to 4.13.1 did not break anything.

mmunchandersen commented 4 years ago

@harski I have never touched package-lock.json. Is this where you have bumped node-sass to 4.13.1? 2020-03-21_18-59-02

(sass / node-sass / releases: https://github.com/sass/node-sass/releases)

harski commented 4 years ago

@mmunchandersen I put "devDependencies": { "node-sass": "^4.13.1" } to my own project's package.json and ran npm install. The dependency got resolved to a node 12 compatible version.

mmunchandersen commented 4 years ago

thanks @harski it appears to have solved my issue too

nitro404 commented 4 years ago

This can also be fixed by both bumping the internal version or by allowing the compiler to be passed in as an argument via https://github.com/dlmanning/gulp-sass/pull/748.