如何使用Yarn安装最新版本的Next.js?

问题描述 投票:0回答:1
$ yarn add https://github.com/zeit/next.js.git
yarn add v1.7.0
[1/4] 🔍  Resolving packages...
error Can't add "nextjs-project": invalid package version undefined.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

我想要最新的代码,但是由于某种原因它没有安装。

npm package yarn next.js
1个回答
0
投票

您要添加依赖包还是克隆该项目?

如果要创建/克隆该项目,请使用:git clone https://github.com/zeit/next.js.git

如果要添加依赖包,请使用:yarn add next.js

© www.soinside.com 2019 - 2024. All rights reserved.