Preview:
npm rebuild node-sass

// Sometimes this will throw an error along these lines
gyp ERR! stack Error: `make` failed with exit code: 2

// The most likely thing is that the version of node-sass installed on your project is incompatible to your version of Node

// To fix this, visit https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick-guide-for-minimum-support to confirm whether this is the case. If so, install n (the interactive version manager) by running:

npm install -g n
// make cache folder (if missing) and take ownership
sudo mkdir -p /usr/local/n
sudo chown -R $(whoami) /usr/local/n

// Install the appropriate version of node
n 10.16.0 
// or 
n lts // for the most recent stable release with long term support

// If it throws a sudo error along these lines,

Error: sudo required (or change ownership, or define N_PREFIX)

// Take ownership of node install destination folders
sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter