栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

由于node-gyp,Npm无法安装

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

由于node-gyp,Npm无法安装

我过去也遇到过同样的问题。这是解决方案。您可能需要几次重新启动计算机才能清除所有错误。

解:

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

希望能帮助到你。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/485029.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号