Author -  Sai gowtham

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

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

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 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: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.0
gyp 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/fsevents
gyp ERR! node -v v13.10.33
gyp ERR! node-gyp -v v5.0.7
gyp 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.

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

xcode is installing

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

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2023 (Beginner + Advanced)
JavaScript - The Complete Guide 2023 (Beginner + Advanced)
116,648 students enrolled
52 hours of video content
$14.99 FROM UDEMY
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
631,582 students enrolled
49 hours of video content
$24.99 FROM UDEMY
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
203,937 students enrolled
31.5 hours of video content
$14.99 FROM UDEMY