Home > Mobile >  Facing error while running ng serve command
Facing error while running ng serve command

Time:03-14

I am trying to run ng serve command for my project , i tried npm i command for many times, but it showing same error continously. Node version is : v16.13.2 Npm version is : 8.4.1

Image is of error

CodePudding user response:

Your Issue

The error you facing with running the application is issue with the SCSS compilation. Certain packages are missing related scss Try - npm rebuild node-sass --force

If still doesn't work out, freshly recreate the project and follow standard installation of libraries related to scss.

Helping Link:

  1. Angular won't run my ng serve - Sass Loader error
  2. Node Sass does not yet support your current environment: Linux 64-bit with false

Standard Angular Issue Resolution

  1. Delete package-lock.json.
  2. Clear cache - npm cache clean --force or npm cache clean -f
  3. Delete node_modules folder
  4. Reinstall dependencies - npm install
  5. Run the application - ng serve

CodePudding user response:

Please follow below steps to resolve this issue which worked in my case.

  1. Delete node-sass folder (..\ AppData\Roaming\npm-cache\node-sass), node-modules folder and package-lock.json

  2. Clear cache - npm cache clean --force

  3. Reinstall node-sass globally - npm i [email protected] --unsafe-perm=true --allow-root

  4. Reinstall project dependencies - npm install -no-package-lock

  5. Start application - ng serve or npm start

This should update your node-sass global version. (please update version that you need to have as per your project)

  • Related