How to install node-sass on Wind

2019-11-23  本文已影响0人  凌杰991

Install Node | NPM | NRM globally , you can use NVM to do the installation of Node & NPM

Use taobao registry by NRM

$ nrm use taobao

Install Python

Install Python 2.7.x of the latest version

Make Add python to path checked and set other configurations to default during installation

Install windows-build-tools, the installation will take at least 30 minutes

$ npm i -g --production windows-build-tools

After install windows-build-tools successfully, set msvs_version npm config and add system environment valuables

$ npm config set msvs_version 2017

System environment valuables you have to add

Valuable Key Valuable Value
MSBuildExtensionsPath C:\Program Files\MSBuild
MSBuild C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin
VCTargetsPath C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets

Install node-gyp globally

$ npm i -g node-gyp

Install node-sass globally, it will save you some time if you install node-sass again

$ npm i -g node-sass
上一篇下一篇

猜你喜欢

热点阅读