Skip to content

Instantly share code, notes, and snippets.

@amphineko
Last active September 26, 2016 05:26
Show Gist options
  • Save amphineko/06992ccef6a9b665ed5407222c74c599 to your computer and use it in GitHub Desktop.
Save amphineko/06992ccef6a9b665ed5407222c74c599 to your computer and use it in GitHub Desktop.
yet another memo of installing node-sass

Retrieve node.js version and convert to release number at Previous releases page. v6.6.0 is 48.

> node -v
v6.6.0

Retrieve the binding binary at node-sass-binaries.

win32-x64-48_binding.node

Set a environment variable to define binding file to be used by node-sass.

set SASS_BINARY_PATH=somewhere\win32-x64-48_binding.node

Then fire the installation command with a mirror in China.

npm install --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist node-sass

Postscript: If you found 'libsass' bindings not found. Try reinstalling 'node-sass'? problem stills, manually putting binding files in vendor directory may help. For example, when using gulp-sass:

cp win32-x64-48_binding.node node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-node-6.6\binding.node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment