安装node-sass出现的问题
用npm安装node-sass的时候一直安装不成功,在网上搜了搜,终于解决了!
报错
这是在npm install node-sass --save-dev时报的错:
...
gyp ERR! configure error
gyp ERR! stack Error: Can\'t find Python executable \"python\", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (E:\\vue\\store\\node_modules\\node-gyp\\lib\\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (E:\\vue\\store\\node_modules\\node-gyp\\lib\\configure.js:509:16)
gyp ERR! stack at E:\\vue\\store\\node_modules\\graceful-fs\\polyfills.js:282:31
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command \"F:\\\\nodeJs\\\\node.exe\" \"E:\\\\vue\\\\store\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\" \"--verbose\" \"--libsass_ext=\" \"--libsass_cflags=\" \"--libsass_ldflags=\" \"--libsass_library=\"
gyp ERR! cwd E:\\vue\\store\\node_modules\\node-sass
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
...
emmm,实在不懂
解决办法
在网上看了各位大神的解决办法,然后自己试了试。发现使用淘宝镜像安装就可以了。但是得先把错误的删除。
npm uninstall node-sass
删除完成后,再重新使用淘宝的镜像安装
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
终于成功了!
感言
自己着实是个菜鸡,前端的路还很远。路漫漫其修远兮,欢迎各位大神指教。
继续阅读与本文标签相同的文章
上一篇 :
网站提示有风险?上海网站制作给你解决方案!
-
活动回顾丨阿里云业务中台最佳实践沙龙圆满落幕
2026-05-19栏目: 教程
-
在CentOS里查看ssh的登录记录
2026-05-19栏目: 教程
-
好程序员web前端学习路线分享纯css绘制各种图形
2026-05-19栏目: 教程
-
菜鸟裹裹快递员收入有多高?小哥晒出月流水,程序员表示羡慕了
2026-05-19栏目: 教程
-
开发者必读 · 周报 | 002期
2026-05-19栏目: 教程
