Whenever I attempt to install packages using npm, I encounter an error that halts the process completely. The error message appears consistently with the following detail:
gyp: No Xcode or CLT version detected!
Currently, I’m using node -v → v8.8.0 and npm -v → v6.11.3.
I’ve tried executing this command in both the VSCode terminal and iTerm, and both yield the same results. This problem arose after I updated my macOS to Catalina 10.15.3. Below is the detailed error log that I receive:
$ npm install
> [email protected] install /Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents
> 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 (/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/synapse/.nvm/versions/node/v8.8.0/bin/node" "/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v8.8.0
gyp ERR! node-gyp -v v5.0.3
npm WARN [email protected] No repository field.
npm WARN The package react-dropzone is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
What steps can I take to fix this compilation issue?