Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (88)

I'm deploying my Vue.js project on GitLab pages.

Running npm run build during GitLab CI pipeline results in errors:

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (88)

I don't get any errors during npm run build locally.

Appreciate if someone can help.

like image 622
john grad Avatar asked Oct 28 '20 10:10

john grad


People also ask

What node Sass does?

Node-sass is a library that provides binding for Node. js to LibSass, the C version of the popular stylesheet preprocessor, Sass. It allows us to natively compile SCSS files to CSS.

Is node Sass deprecated?

Warning: LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass.

Should I use Sass or node sass?

For smaller or typical Sass projects, Dart-Sass(JS) is perfect, it's easy to install without any external binding dependencies like node-sass. If your sass files take time to compile and if Node-Sass supports all the features you used, then go with Node-Sass!


2 Answers

node-sass does not support Node 15 (runtime **) currently. It will come with when v5 when it is published to NPM. You can subscribe to the tracking issue here https://github.com/sass/node-sass/issues/2965 node-sass 4.x will not receive support for Node 15 https://github.com/sass/node-sass#node-version-support-policy, so you may want to downgrade your Node version to 14 currently

like image 68
nschonni Avatar answered Oct 10 '22 17:10

nschonni


As mentioned in a comment, I also had to run npm rebuild node-sass. So my complete steps to fix were:

nvm ls-remote | grep v14.
nvm install 14.17.5
npm rebuild node-sass
npm install
npm run build
like image 45
twhitney Avatar answered Oct 10 '22 17:10

twhitney