我过去也遇到过同样的问题。这是解决方案。您可能需要几次重新启动计算机才能清除所有错误。
解:
1. Install Install VC++ Build Tools 2017 and while installing select V140 from the side menu2. Install Python 2.7, and add it to your PATH3. npm config set python python2.7 --global4. npm config set python C:Python27python.exe --global5. npm config set msvs_version 2015 --global6. set VCTargetsPath=C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V140**Note: If you still face error > most likely the problem is node-sass is not installed**
完成此步骤后,您必须重新启动计算机
7. Install the latest versions of Python8. As Admin:$ cd "C:Program Filesnodejsnode_modulesnpm"$ npm install node-gyp9. $ npm config set msvs_version 2015 --globalNote: that I have VS 2017, but configuring it as ver 2017 won't work. Not sure why. 10. As Admin:$ npm install -g node-sassAnd finally, one last check:$ node-sass -v
希望能帮助到你。



