Error with node-sass when running npm install

date
Jan 3, 2023
slug
error-when-npm-install-node-sass
status
Published
tags
Bugfix
Node.js
Webpack
summary
type
Post

Problem

I tried to install the tools for Webpack to turn sass into css
but I got the error below:

Solution

There are two ways to fix that problem:
  1. Upgrade the node-sass version in package.json file
    1. I was using Node v19.3.0, and as per the release docs of node-sass, I should upgrade the node-sass version to support it.
      to be
  1. Install npm package sass instead
    1. node-sass has been deprecated. It has been transformed to the npm package sass.
      We can remove node-sass dependency from package.json file and install sass:

References


© Foy Wan 2022 - 2025