npm - 如何摆脱 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
完整的日志可以在这里查看
提前致谢。
解决方案
推荐阅读
- oracle - 通过 toad 连接到私有子网中的 Aws RDS
- sql - X时间后如何删除一些记录或文件 - Laravel 5
- sapui5 - 如何正确绑定异步。将数据从新闻 API 加载到视图并将数据显示为内容?
- node.js - Mongodb $addFields,从函数返回字段值?
- python-3.x - 我将如何在 python 3.x 中重写这个 wget post 语句?
- fish - 如何从文件加载fish命令历史
- powershell - 您好,我正在尝试编写一个将文件夹上传并覆盖到另一个文件夹的 powershell 脚本
- php - 我需要显示数组的数组
- pandas - pandas datframe 用分类列上的条件替换数字列
- java - 如何单击具有动态变量的类