【问题标题】:Unable to resolve No matching version found for gatsby-cli@next无法解决 找不到与 gatsby-cli@next 匹配的版本
【发布时间】:2021-01-23 10:24:26
【问题描述】:

我尝试使用和不使用 sudo 运行以下命令,但无法安装 gatsby。 npm install --global gatsby@next gatsby-cli@next 这是我的错误。

npm ERR! code ETARGET
npm ERR! notarget No matching version found for gatsby-cli@next.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-08T11_08_10_903Z-debug.log

【问题讨论】:

    标签: linux ubuntu npm installation gatsby


    【解决方案1】:

    npm 中的@next 指的是tag。在这种情况下,gatsby-cli 没有 tag。默认情况下,如果你运行:

    npm install -g gatsby-cli
    

    它将采用最新版本的gatsby-cli 包。

    您可以在npm documentation查看更多详细信息。

    【讨论】:

    • 它说成功,但我收到了很多不推荐使用的警告,可以吗?还是我应该在继续之前解决这个问题?
    • 它们是 gatsby-cli 依赖本身的开发依赖警告。它们根本不关心你,你无法避免它们。您完全不必担心。因为它是一个发布版本,所以你的包是安全的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-04
    • 1970-01-01
    • 2019-08-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-26
    相关资源
    最近更新 更多