Gulp-sass: Outdated node-sass is incompatible with node 12

Created on 4 Mar 2020  路  6Comments  路  Source: dlmanning/gulp-sass

Hey,

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

Most helpful comment

@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.

All 6 comments

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-xGulpfile.js"...
cmd.exe /c gulp --tasks-simple
C:project-xnode_modulesnode-sasslibbinding.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-xnode_modulesnode-sasslibbinding.js:13:13)
at Object. (C:project-xnode_modulesnode-sasslibindex.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-xnode_modulesgulp-sassindex.js:162:21)
at Module._compile (internal/modules/cjs/loader.js:959:30)

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

@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)

@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.

thanks @harski it appears to have solved my issue too

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EpicOkapi picture EpicOkapi  路  5Comments

kiki-le-singe picture kiki-le-singe  路  6Comments

webchaz picture webchaz  路  3Comments

bertez picture bertez  路  8Comments

arontsang picture arontsang  路  5Comments