Anurag Chugh
Anurag Chugh

Reputation: 609

npm install error - No Xcode or CLT version detected?

"no receipt for 'com.apple.pkg.cltools_executables' found at '/'"

Above error is thrown while running 'npm install' for an angular 9 project in VS Code bash terminal for MacOS (Catalina)

Package.json dependencies:

    "@angular/animations": "~9.1.1",
    "@angular/common": "~9.1.1",
    "@angular/compiler": "~9.1.1",
    "@angular/core": "~9.1.1",
    "@angular/platform-browser": "~9.1.1",
    "@angular/platform-browser-dynamic": "~9.1.1",
    "@angular/router": "~9.1.1",
    "rxjs": "~6.5.4",
    "tslib": "1.10.0",
    "zone.js": "0.10.2"

Upvotes: 13

Views: 8741

Answers (1)

Anurag Chugh
Anurag Chugh

Reputation: 609

I got this working by following the steps below:

  • Find out the path for the command line tools xcode-select --print-path

  • Delete command line tools directory ( Directory path can be retrieved from the above step ) sudo rm -rf /Library/Developer/CommandLineTools

  • Run this to re-install xcode-select --install

Post this, 'npm install' should run successfully on VS Code in MacOS bash terminal.

Upvotes: 26

Related Questions