gpt4 book ai didi

angular - npm安装错误-未检测到Xcode或CLT版本?

转载 作者:行者123 更新时间:2023-12-03 15:27:20 25 4
gpt4 key购买 nike

“在'/'找不到'com.apple.pkg.cltools_executables'的收据”
在Mac OS(Catalina)的VS Code bash终端中为angular 9项目运行'npm install'时抛出上述错误
Package.json依赖项:

    "@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"

最佳答案

我按照以下步骤操作:

  • 找出命令行工具的路径xcode-select --print-path
  • 删除命令行工具目录(可以从上述步骤中检索目录路径)sudo rm -rf /Library/Developer/CommandLineTools
  • 运行此命令以重新安装xcode-select --install

  • 发布此内容后,“npm install”应该可以在MacOS bash终端的VS Code上成功运行。

    关于angular - npm安装错误-未检测到Xcode或CLT版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63300339/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com