Skip to content

Instantly share code, notes, and snippets.

@am11
Last active March 29, 2016 22:09
Show Gist options
  • Save am11/e5de3c49c219f0811e1d to your computer and use it in GitHub Desktop.
Save am11/e5de3c49c219f0811e1d to your computer and use it in GitHub Desktop.
node-sass installation script (Windows)
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 win<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
rmdir /s/q \temp1
# or if you were using powershell
rm -r \temp1
@am11
Copy link
Author

am11 commented Feb 4, 2015

@PhiLhoSoft
Copy link

Useful, but with node-sass 3.0.0-alpha.0, the command line is:

node -p "console.log(require('node-sass').info)"

(ie. info is a property, no longer a function)

@am11
Copy link
Author

am11 commented Mar 21, 2015

@PhiLhoSoft, thanks. It's fixed.

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