在执行npm install执行报错node-sass
2024-09-18 13:48:08
1 错误信息
这个错误信息不是我当时的报错信息,是网上找的,报错的时候忘记存了,处理好了又找不到错误信息,就从网上找的差不多的错误信息
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\zhuon\AppData\Local\Programs\Python\Python36\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (G:\Workspace\ManYan\manyan-nav\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (G:\Workspace\ManYan\manyan-nav\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at G:\Workspace\ManYan\manyan-nav\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:\\dev\\nodejs\\node.exe" "G:\\Workspace\\ManYan\\manyan-nav\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags="
"--libsass_library="
gyp ERR! cwd G:\Workspace\ManYan\manyan-nav\node_modules\node-sass
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed
npm WARN co-mocha@1.2.0 requires a peer of mocha@>=1.18 <4 but none was installed.
npm WARN egg-restapi-module-tool@1.0.0 No repository field.
npm WARN egg-restapi-module-tool@1.0.0 scripts['server'] should probably be scripts['start']. npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.8.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in:
npm ERR! D:\nodejs\cache\_logs\2017-09-02T16_06_24_298Z-debug.log
2 错误原因
node-sass sass-loader nodejs版本不对应
3 查看当前项目的版本
打开package.json,搜索node,可以看到node-sass的版本
4 版本对应关系
5 根据项目的node-sass版本选择合适版本的nodejs
我的是4.14.1,对应的nodejs版本是14,所以需要更换下nodejs的版本
版本管理:https://www.cnblogs.com/jthr/p/16529620.html
最新文章
- 对ASP.NET 5和ASP.NET MVC 6应用程序进行集成测试
- JDBC链接oracle已经mysql的测试
- json2.js的用途(拯救IE)
- linux 安装python,pip,
- C++ STL之map常用指令
- day04
- 大转盘Demo
- 实习第一天之数据绑定:<;%#Eval(";PartyName";)%>;&#39;
- sgu128snack
- HDFS运行原理
- LeetCode 189. Rotate Array (旋转数组)
- 手把手教你用.NET Core写爬虫
- SQL Server脚本
- 在myeclipse中使用log4j记录日志
- SSM事务——事务回滚如何拿到返回值
- unity 中的协程
- 【ORACLE】ORACLE RAC设置控制文件多路
- Codeforces Round #526 (Div. 2) Solution
- 深入理解Spring系列之七:web应用自动装配Spring配置
- Loj 538 递推数列
热门文章
- 【题解】CF374C Inna and Dima
- 读Bilgin Ibryam 新作 《Dapr 是一种10倍数 平台》
- vivo大数据日志采集Agent设计实践
- ArcGIS 添加Excel数据 报错 ArcGIS Failed to connect to database 外部数据库驱动程序(1)中的意外错误
- 全都会!预测蛋白质标注!创建讲义!解释数学公式!最懂科学的智能NLP模型Galactica尝鲜 ⛵
- 提高python异步效率
- CGI、WSGI、uWSGI、ASGI……
- 五年经验的前端社招被问:CPU 和 GPU 到底有啥区别?
- 使用NPOI core插入图片
- BeanShell 后置处理器/前置处理器实现urldecode 解码