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與python版本不匹配報錯:node-gyp rebuildPythonRebuild
- Rebuild TreeRebuild
- MSSQL Rebuild(重建)索引SQLRebuild索引
- [Node.js]npm安裝node-gypNode.jsNPM
- npm ERR! Unexpected token in JSON at position 0 while parsing near ’ npm ERR! <!–////////NPMJSONWhile
- code EACCESnpm ERR! syscall renamenpm ERR! path /usr/local/bin/webpack errno -13NPMWeb
- flutter中的rebuild一些理解FlutterRebuild
- smbmap報[*] Detected 0 hosts serving SMB
- Unknowm Intel PCH (Bx7110) detectedIntel
- npm ERR! code ECONNRESET npm ERR! errno ECONNRESET網路問題解決NPM
- 報錯:npm ERR! missing script: serve npm ERR! A complete log of this run can be found in:NPM
- 【Vue】npm ERR! code ERESOLVEVueNPM
- Xcode 10.2XCode
- TensorFlow 報錯 CUDA driver version is insufficient for CUDA runtime version
- 【問題處理】IPC Send timeout detected
- IDBDatabase.versionDatabase
- MySQL Version TokensMySql
- 理解Semantic Version
- Angular macOS Err:EACCES: permission deniedAngularMac
- flutter防止widget rebuild終極解決辦法FlutterRebuild
- 解決The given version [xx] is not supported, only version 1 to 10 is supported in this buildUI
- ORA-39358: Export dump file version 12.1.0 not compatible with target version 11Export
- PJSIP version 2.7.2 For AndroidJSAndroid
- JDK版本 - Major VersionJDK
- Reverse Card (Hard Version)
- Prefix Flip (Easy Version)
- Catch the Mole(Easy Version)
- Keil中translate,build和rebuild有什麼區別Rebuild
- xcode 12有哪些改動?xcode 12新功能介紹XCode
- Maven多模組中,parent version如何採用自定${version}表示Maven
- iOS Xcode快捷鍵iOSXCode
- iOS Xcode全面剖析iOSXCode
- Mac && Xcode 日常TipsMacXCode
- Xcode 除錯技巧XCode除錯
- Xcode編譯流程XCode編譯
- Xcode事件十問XCode事件
- Xcode 常用 LLDB 指令XCodeLLDB
- Xcode的Refactor使用XCode