无法解析找不到与gatsby-cli @ next匹配的版本

时间:2020-10-08 11:15:34

标签: linux ubuntu npm installation gatsby

我尝试在有和没有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

1 个答案:

答案 0 :(得分:2)

npm中的

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

npm install -g gatsby-cli

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

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