安装webpack ,报错提示

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/npminstall/node-gyp-bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/webpack/node_modules/_fsevents@1.2.13@fsevents
gyp ERR! node -v v14.17.4
gyp ERR! node-gyp -v v4.0.0
gyp ERR! not ok 

解决方案
阅读报错信息,尝试各种方案,终于解决!
首先在终端输入下面命令下载

xcode-select --install
1.如果报错如下
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
2.表示已经存在,重置即可
xcode-select --reset

如果下载 xcode-select失败,那就需要到官方给开发者提供的下载处直接去下载命令行工具(Command Line Tools)

1.地址:https://developer.apple.com/download/all/
2.在搜索框,搜索:Command Line Tools
3. 选择合适的版本下载即可

4.安装简单,傻瓜式安装即可,安装完成后,再执行上述两个命令即可

xcode-select --install
1.如果报错如下
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
2.表示已经存在,重置即可
xcode-select --reset

Mac安装webpack报错gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1解决相关推荐

  1. mac上安装webpack报错解决方法Hit error EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/webpack

    mac上安装webpack报错解决方法Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/webpack 参 ...

  2. 解决Mac安装tesserocr报错问题 Failed building wheel for

    解决Mac安装tesserocr报错问题 Failed building wheel for 参考文章: (1)解决Mac安装tesserocr报错问题 Failed building wheel f ...

  3. Mac安装Node-sass报错 warning: loop variable ‘numerator‘ creates a copy from type ‘const std::string

    Mac安装Node-sass报错 运行前端项目,npm i 时报错 warning: loop variable 'numerator' creates a copy from type 'const ...

  4. PIP安装mysqlclient报错:Building wheel for mysqlclient (pyproject.toml) ... error error: subproces

    conda环境下安装mysqlclient报错 这个问题困了2天,翻了好多博客都没有解决,最终找到解决方案,特分享一下: 话不多说,上干货!!! Ubuntn: 先执行: apt-get instal ...

  5. xcode编译报错unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1

    升级完xcode9.1之后,编译项目出现如下错误: CI今日构建时报出如下错误: /Users/xxx/Library/Developer/Xcode/DerivedData/Snowball-ebl ...

  6. xcodebuild构建时报错unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1

    CI今日构建时报出如下错误: /Users/xxx/Library/Developer/Xcode/DerivedData/Snowball-ebllohyukujrncbaldsfojfjxwep/ ...

  7. 解决Mac安装LightGBM报错LightGBM and gcc 8 in MacOS: Library not loaded

    Github Issue上有一个解决方法,但是博主失败了:https://github.com/Microsoft/LightGBM/issues/1369 以下是我的解决方法: 博主解决方法 首先卸 ...

  8. mac安装adb报错Unknown command: cask

    1.通过 Homebrew 安装 adb user/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/mast ...

  9. mac安装nvm报错 :HTTP/2 stream 1 was not closed cleanly before end of the underlying stream 解决方案

    1. http/1.1 在mac安装nvm时,在解决了443的错误之后,又提示 git 拉取 的错误 fatal: unable to access 'https://github.com/nvm-s ...

最新文章

  1. 深入理解JAVA序列化
  2. 苹果被正式起诉!欧盟:滥用主导地位,利用App Store扭曲竞争
  3. 【数理知识】《数值分析》李庆扬老师-第6章-解线性方程组的迭代法
  4. 解除单个文件的与svn服务器的关联
  5. mysql 数据修改时间_怎样修改mysql数据中的具体时间
  6. Spring : Spring外部配置加载顺序
  7. 大数据之-Hadoop之HDFS的API操作_定位读取文件_只读取某个block的内容_案例---大数据之hadoop工作笔记0065
  8. 软件项目经理新手上路16 - 后记,一切才刚刚开始
  9. opengl es3.0游戏开发学习笔记2--绘制地月星系
  10. python元祖用法_python中元组的用法整理
  11. 如何一键生成gif动画?如何将录屏转成gif动画?推荐一款绿色开源小软件ScreenToGif
  12. msg邮件转eml邮件
  13. 软件架构设计-软件架构风格、分层架构
  14. Restful 接口传递参数
  15. rdmsr获取Intel CPU温度
  16. 快手信息流投放平台:快手电商宣告成年
  17. wifi密码公式计算机,用定积分知识破译wifi密码,数学知识什么时候能派上用场?...
  18. 告别传智,重新上路----近5年来的总结及未来5年的计划
  19. 盘点人工智能重点技术领域
  20. linux批量替换文件内容

热门文章

  1. (二分搜索)cable master
  2. matlab函数算错,函数是这个样子的,我是不懂应该怎么输入,试了好多种情况都是错...
  3. HTML+CSS+JS实现 ❤️乐队成员图片展示ui特效❤️
  4. 基于JavaSwing+Mysql点餐系统设计和实现
  5. java客户端连接请求发不出去_java – Spring:客户端发送的请求在语法上不正确()...
  6. c语言文件读写_学生信息管理系统(C语言\单向链表\文件读写)
  7. 一句话概括自动装箱/拆箱
  8. python数据结构中文版_Python官方入门教程_中文版_5.数据结构
  9. C++ 重载左移和右移运算符
  10. C语言逻辑运算符详解