zoukankan      html  css  js  c++  java
  • gyp: No Xcode or CLT version detected 在 macOS Catalina 错误解决办法

    当我们在mac上使用Node.js 开发 使用 npm install 命令时候遇到上面的错误 

    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:345:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    gyp ERR! System Darwin 19.4.0

    解决办法如下:

    首先第一步,通过运行以下命令来获取已安装的命令行工具的位置

    xcode-select --print-path

    返回以下位置

    第二步:我们将这个位置路径删除掉,通过以下命令进行删除

    sudo rm -rf /Library/Developer/CommandLineTools

    第三步:我们执行以下命令进行重新安装

    xcode-select --install

    点击安装,然后同意许可以继续安装,安装成功如下

    然后们再执行Node命令,问题已解决

  • 相关阅读:
    Windows 10 将MySQL5.5升级为MySQL5.7
    Django Rest Swagger生成api文档
    inception安装使用
    django 日志配置
    构建NTP时间服务器
    django 模型关系
    python 开发环境配置
    mongodb远程备份
    rest framework 尝鲜
    Django Rest Framework-介绍
  • 原文地址:https://www.cnblogs.com/ljygirl/p/14440950.html
Copyright © 2011-2022 走看看