problem
Recently, using npm to install modules in macOS Catalina, the following errors often occur:
> 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
- Screenshot below
solution
1. Try to repair with the following command
$ xcode-select --install
The system prompts the following information:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
In fact, there is no so-called “Software Update” to update
2. Correct posture
When I was unable to do anything, I found the following solution:
$ sudo rm -rf $(xcode-select -print-path)
$ xcode-select --install
Read More:
- Xcode debugging for the real iPhone Error: code signature version is no longer supported
- Error: Your CLT does not support macOS 11.6 [How to Solve]
- [Solved] Executing npm install error: npm ERR! code EINTEGRITY
- Analysis of npm error ENOTFOUND npm ERR! network request to https://npm.***.com/*** failed and the role of the .npmrc file
- Flutter Xcode Module not found or LibreSSL SSL_connect: SSL_ERROR_SYSCALL
- NPM install error: Cannot find module ‘D:\zip\node_modules\npm\bin\npm-cli.js‘
- Error:scalac: missing or invalid dependency detected while loading class file ***
- How to Solve Node GYP Rebuild Error
- Puppeteer Error: Chromium revision is not downloaded. Run “npm install“ or “yarn install“
- NPM Install Error: npm ERR! ERESOLVE unable to resolve dependency tree
- [Solved] – npm run dev Error: listen EADDRINUSE: address already in use :::8000(or 8080 etc.)
- [Solved] NO ST-LINK detected/ST-LINK USB communication error
- TensorFlow-gpu Error: failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
- [Solved] Elasticsearch error: cannot downgrade a node from version [7.xx.x] to version [7.xx.x]
- Cuda Runtime error (38) : no CUDA-capable device is detected
- npm install npm ERR code ERESOLVE [How to Solve]
- How to Solve Xcode M1 simulator Error
- [Solved] Xcode error: cycle inside*******; building could produce unreliable results.
- [Solved] Xcode13.1 Upgrade Error: CocoaPods installed but not working Failed to build gem native extension
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory