npm ERR! gyp verb check python checking for Python executable “python2“ in the PATH

npm 下载 gpy(给爷爬)失败,大概率是下载node-sass失败了
👇👇👇

npm ERR! path xxx\src\main\webapp\admin\node_modules\node-sass

解决办法

在项目根目录添加 .npmrc
例如:

在这里插入图片描述
在里面写如下内容:

registry=https://registry.npmmirror.com sass_binary_site=https://npmmirror.com/mirrors/node-sass/ phantomjs_cdnurl=https://npmmirror.com/mirrors/phantomjs/ electron_mirror=https://npmmirror.com/mirrors/electron/ sqlite3_binary_host_mirror=http://npmmirror.com/mirrors/ profiler_binary_host_mirror=http://npmmirror.com/mirrors/node-inspector/ chromedriver_cdnurl=https://npmmirror.com/mirrors/chromedriver sentrycli_cdnurl=https://npmmirror.com/mirrors/sentry-cli/

另外需要注意node的版本

博主使用 14.17.0 能正常下载,使用16就报错了,建议使用nvm管理


__EOF__

本文作者Reisen7
本文链接https://www.cnblogs.com/reisen7/p/18547106.html
关于博主:评论和私信会在第一时间回复。或者直接私信我。
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
声援博主:如果您觉得文章对您有帮助,可以点击文章右下角推荐一下。您的鼓励是博主的最大动力!
posted @   Reisen7  阅读(164)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示