I had the same problem and I solved with the steps:
- if your are on Apple M1 Chip, run terminal with
Rosetta 2(optional, only necessary if you have the Node installed with Rosetta) - check your
node-sassversion in yourpackage.jsonand 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 |
- check your Node version with:
node --version - install the Nodejs version according with your
node-sass, if your are using NVM, run:nvm use DESIRED_VERSION - clean old node_modules deleting the folder or type this on terminal:
rm -rf node_modules - run:
npm install
Resource:
- https://www.npmjs.com/package/node-sass