If you get the following error and need a solution, then look no further!

1
2
3
4
5
6
7
8
npm ERR! code 1
npm ERR! path ./node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js

npm ERR! gyp verb cli   './node_modules/node-gyp/bin/node-gyp.js',
npm ERR! gyp verb cli   'rebuild',
npm ERR! gyp verb cli   '--verbose',

Option 1 – With npm

First, remove the node-sass dependency from your package.json, then:

1
2
3
npm install
npm i sass
npm start

Option 2 – With yarn

First, remove the node-sass dependency from your package.json, then:

1
2
3
yarn install
yarn add sass
yarn start