ERR: node-gyp rebuild No Xcode or CLT version detected
在執行npm install 或者 vue create的時候報錯出以下的錯誤:
> node-gyp rebuild
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
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/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/yangjian/Documents/temp/test001/node_modules/fsevents
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
親測該錯誤是由於升級了系統版本,但Command Line Tools
版本不相容導致,需要解除安裝並重新安裝,當然如果你沒有XCODE理論上需要先安裝XCODE。
// 刪除
$ sudo rm -rf $(xcode-select -print-path)
# 可以先嚐試這個第二條命令。但系統應該已經安裝了。
$ xcode-select --install
如果解除安裝後安裝時報出 不能安裝該軟體,因為當前無法從軟體更新伺服器獲得
的錯誤,那麼此時需要去蘋果官網手動下載,下載檔案為dmg檔案,直接安裝即可。
注意XCODE的版本和系統版本,我自己保證了XCODE版本一致,系統差一個小版本號,實際安裝之後沒有任何問題。
相關文章
- (node-gyp rebuild 2> builderror.log) 卡住RebuildError
- node與python版本不匹配報錯:node-gyp rebuildPythonRebuild
- Xcode上Version和BuildXCodeUI
- 表格儲存命令列工具CLT(clipython)命令列Python
- npm ERR! code EINTEGRITY npm! ERR! shal-NPM
- alter index rebuild 與 rebuild onlineIndexRebuild
- Rebuild IndexesRebuildIndex
- rebuild indexRebuildIndex
- index rebuildIndexRebuild
- Rebuild TreeRebuild
- [Node.js]npm安裝node-gypNode.jsNPM
- rebuild與rebuild online效率比對Rebuild
- 聊聊索引Index Rebuild和Rebuild Online(下)索引IndexRebuild
- 索引rebuild和rebuild online時要慎重索引Rebuild
- 聊聊索引Index Rebuild和Rebuild Online(上)索引IndexRebuild
- err_quit()UI
- rebuild index 排序RebuildIndex排序
- sybase rebuild indexRebuildIndex
- alter index rebuild和rebuild online的區別IndexRebuild
- 索引rebuild和rebuild online時要慎重(轉載)索引Rebuild
- Index rebuild --case 1IndexRebuild
- MSSQL Rebuild(重建)索引SQLRebuild索引
- IPC Send timeout detected
- code EACCESnpm ERR! syscall renamenpm ERR! path /usr/local/bin/webpack errno -13NPMWeb
- ORACLE中index的rebuildOracleIndexRebuild
- Index Online RebuildIndexRebuild
- NBU detected IBM drives as unusableIBM
- GLOBAL ENQUEUE SERVICES DEADLOCK DETECTEDENQ
- Oracle Executable Binary Mismatch DetectedOracle
- npm ERR! Unexpected token in JSON at position 0 while parsing near ’ npm ERR! <!–////////NPMJSONWhile
- 【羅玄】從鎖的角度看rebuild index online和rebuild indexRebuildIndex
- 報錯:npm ERR! missing script: serve npm ERR! A complete log of this run can be found in:NPM
- npm ERR! code ECONNRESET npm ERR! errno ECONNRESET網路問題解決NPM
- alter index ind1 rebuild 和alter index ind1 rebuild onlineIndexRebuild
- Angular macOS Err:EACCES: permission deniedAngularMac
- oracle 817 archive err,oracle hangOracleHive
- 【Vue】npm ERR! code ERESOLVEVueNPM
- 排查 “Detected Tx Unit Hang”問題