error /node_modules/node-sass: Command failed

I had the same problem and I solved with the steps:

  1. if your are on Apple M1 Chip, run terminal with Rosetta 2 (optional, only necessary if you have the Node installed with Rosetta)
  2. check your node-sass version in your package.json and compare with the following table:
NodeJS Supported node-sass version Node Module
Node 16 6.0+ 93
Node 15 5.0+ 88
Node 14 4.14+ 83
Node 13 4.13+, <5.0 79
Node 12 4.12+ 72
Node 11 4.10+, <5.0 67
Node 10 4.9+, <6.0 64
Node 8 4.5.3+, <5.0 57
Node <8 <5.0 <57
  1. check your Node version with: node --version
  2. install the Nodejs version according with your node-sass, if your are using NVM, run: nvm use DESIRED_VERSION
  3. clean old node_modules deleting the folder or type this on terminal: rm -rf node_modules
  4. run: npm install

Resource:

  • https://www.npmjs.com/package/node-sass

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)