Skip to content

Instantly share code, notes, and snippets.

@am11
Last active April 9, 2020 06:57
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save am11/9f429c211822a9b15aee to your computer and use it in GitHub Desktop.
Save am11/9f429c211822a9b15aee to your computer and use it in GitHub Desktop.
node-sass installation script (Linux/Mac)
mkdir ~/temp1
cd ~/temp1
# diagnostic information
npm -v
node -v
node -p process.versions
node -p process.platform
node -p process.arch
# installation
npm install node-sass
# if installed successfully
./node_modules/.bin/node-sass --version
# if version is < 3.0.0
node -p "console.log(require('node-sass').info())"
# if version is > 3.0.0
node -p "console.log(require('node-sass').info)"
# else if it fails
cd node_modules/node-sass/vendor
# delete darwin-or-linux<something>\binding.node file and
# download the appropriate file in that directory manually from:
# https://github.com/sass/node-sass-binaries/
#
# (for instance: https://github.com/sass/node-sass-binaries/tree/v2.1.1)
node -p "console.log(require('node-sass').info)"
# once this is done, delete ~/temp1
rm -r ~/temp1
@am11
Copy link
Author

am11 commented Feb 28, 2015

@RobLoach
Copy link

RobLoach commented Mar 2, 2015

mkdir /temp1 requires root access.... Suggest using something in the home directory instead.

@am11
Copy link
Author

am11 commented Mar 21, 2015

@RobLoach, thanks. It's fixed.

@am11
Copy link
Author

am11 commented Apr 9, 2020

@WebAzOps, node-sass is a node.js package that compiles Sass code to CSS using a native library called libsass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment