微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

我如何摆脱 gyp 错误?

如何解决我如何摆脱 gyp 错误?

当我尝试在工作项目上运行 npm install 时,我收到了很多 gyp 错误。请注意,我的同事正在使用 mac,而我正在使用带有 WSL 的 Windows 笔记本电脑,我的 mac 还没有到货。我不确定是什么问题,但我一直没能解决这个问题。

npm ERR! path /mnt/c/Users/ever.gonzalez/work/tigo-money-web/node_modules/node-sass
npm ERR! command Failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /home/edgg72/.nvm/versions/node/v16.5.0/bin/node /mnt/c/Users/ever.gonzalez/work/tigo-money-web/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli   '/home/edgg72/.nvm/versions/node/v16.5.0/bin/node',npm ERR! gyp verb cli   '/mnt/c/Users/ever.gonzalez/work/tigo-money-web/node_modules/node-gyp/bin/node-gyp.js',npm ERR! gyp verb cli   'rebuild',npm ERR! gyp verb cli   '--verbose',npm ERR! gyp verb cli   '--libsass_ext=',npm ERR! gyp verb cli   '--libsass_cflags=',npm ERR! gyp verb cli   '--libsass_ldflags=',npm ERR! gyp verb cli   '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@16.5.0 | linux | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4,please use NODEJS_ORG_MIRROR
npm ERR! gyp verb download using dist-url https://nodejs.org/dist
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` Failed Error: not found: python2

可以查看完整日志here

提前致谢。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。