Contact!

Node Sass does not yet support your current environment

Node Sass does not yet support your current environment

If you ever update your version of node then you might start running into the “Node Sass does not yet support your current environment” error. I’ve had this happen a few times (including today), and thought that it might be nice to put a fix here for anyone who might be looking.

This problem happens because the version of node-sass that you have installed is no longer compatible with the version of node you are trying to run it with. I guess this could work either way, but it is more likely that your node-sass version is behind; which is nice, because I would rather upgrade an npm package than downgrade node.

Here are a couple of things you could try. Don’t worry, they are nice and quick, with little fuss.

Note: If you have installed node-sass globally then you will need to run with a ‘-g’ flag.

Rebuild node-sass

npm rebuild node-sass

or

npm rebuild -g node-sass

Running rebuild basically recompiles the package to match the new node version. However, if this doesn’t work for you (which it doesn’t for me) then your best bet is to uninstall and reinstall node-sass.

Uninstall and re-install node-sass

npm uninstall node-sass && npm install node-sass

or

npm uninstall -g node-sass && npm install -g node-sass

Yup, that’s right. If it doesn’t work, wipe it clean and start again!

  1. Chu Xuân Tình says:

    NodeJS Supported node-sass version *
    Node 15 5.0+
    Node 14 4.14+
    Node 13 4.13+, < 5.0
    Node 12 4.12+
    Node 11 4.10+, < 5.0
    Node 10 4.9+
    Node 8 4.5.3+, < 5.0
    Node < 8 < 5.0 In my situation problem was in the version of node. As I used the newest version 16.6.4 but the version of node-sass was old (4.14.1), I downgraded node to 14.15.5 (nvm install 14.15.5), ran npm install [email protected].1, rebuilt node npm rebuild node-sass and just then started my app npm start. Worked!

    Steps:

    1.nvm install 14.15.5 (downgrade node to version that satisfies node-sass)
    *https://nodejs.org/en/blog/release/v14.15.5
    2.nvm use 14.15.5
    3.npm install [email protected].1 (reinstall node-sass)
    4.npm rebuild node-sass
    5.npm start

    After executing these commands everything is working fine for me.
    Chu Xuân Tình

  2. Terry says:

    i am not working why i don’t know stuck in make error

Join the discussion!

You might like:

Create, register and use shortcodes in WordPress

Create, register and use shortcodes in WordPress

by Gav 18/03/2023

Learn how to create and register your own WordPress shortcodes to add dynamic content to your posts and pages.

How to use guard clauses in JavaScript

How to/why use guard clauses in JavaScript

by Gav 16/03/2023

Learn how to improve code readability and performance by using guard clauses in JavaScript. Discover their benefits and best practices.

Implements and Extends, Object Oriented TypeScript

Implements and Extends, Object Oriented TypeScript

by Gav 15/03/2023

Learn the difference between implements and extends in TypeScript. Use Implements to implement interfaces and types, and extends to inherit from classes.

Reading/Parsing and Writing YAML files in PHP, Symfony

Reading/Parsing and Writing YAML files, PHP Symfony

by Gav 14/03/2023

In this tutorial we will look at using YAML in PHP. Learn about Parsing and Writing YAML files using Symfony's YAML component.

Measuring code execution performance in JavaScript

Measuring code execution performance in JavaScript

by Gav 13/03/2023

Measuring code execution performance is an important way to identify bottlenecks. Use these methods in JavaScript to help optimise your code.

Measuring script/code execution time in PHP using microtime

Measuring script/code execution time in PHP, microtime

by Gav 06/03/2023

Find bottlenecks, optimise and clean your code, and speed up your apps by measuring the execution time of your PHP scripts using microtime.

Regenerate WordPress media image sizes, programmatically

Regenerate WordPress media image sizes, programmatically

by Gav 25/02/2021

Learn how to regenerate and update WordPress media and image sizes both programmatically (without plugin), and also with a handy plugin.

Magic Constants in PHP. What they are and how to use them.

Magic Constants in PHP. What they are and how to use them

by Gav 15/02/2021

Ever seen constants like __DIR__ and __FILE__ being used in PHP? These are 'Magic Constants', and this is how we can use them.

Detecting Keypress JavaScript

Detect single and multiple keypress events: JavaScript

by Gav 16/10/2019

Learn how to use event listeners to detect and handle single and multiple keypress events in JavaScript. Add modifier keys to your application!