How to fix the Node gyp Error: No Xcode or CLT version detected

How to fix the Node gyp Error: No Xcode or CLT version detected

In this post we will give you information about How to fix the Node gyp Error: No Xcode or CLT version detected. Hear we will give you detail about How to fix the Node gyp Error: No Xcode or CLT version detectedAnd how to use it also give you demo for it if it is necessary.

we will learn how to solve the node gyp Error: No Xcode or clt version detected in mac os.

no receipt for ‘com.apple.pkg.cltools_executables’ found at ‘/’.

When you update a node.js or npm to the latest version and you are trying to install a new npm package using npm install package-name command you will see the weird error like this in your terminal.

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 errorgyp ERR! stack Error: 'gyp' failed with exit code: 1gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)gyp ERR! stack     at ChildProcess.emit (events.js:98:17)gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)gyp ERR! System Darwin 14.0.0gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"gyp ERR! cwd /usr/local/lib/node_modules/gulp/node_modules/fseventsgyp ERR! node -v v13.10.33gyp ERR! node-gyp -v v5.0.7gyp ERR! not ok

To fix this error, you need to re-install the Xcode command-line tools.

  1. First, delete the Xcode tools by using the below command.
sudo rm -rf $(xcode-select -print-path)

This above command asks for a system password.

  1. Now, install the Xcode by running this command.
xcode-select --install

This command prompts with a popup, click on the install button and proceed with the installation.

See also  [SOLVED] URL blocked: This redirect failed because the redirect

It takes some time to download and install the Xcode command-line tools.

Once you are successfully installed, you can now download new npm packages without any (gyp) error messages.

Hope this code and post will helped you for implement How to fix the Node gyp Error: No Xcode or CLT version detected. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

Leave a Comment