日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2025/3/15 编程问答 14 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Mac安装webpack报错gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1解决 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝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解决的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。