无法创建新的 Gatsby 项目
Can't create new Gatsby project
从 Gatsby 启动器创建一个 Gatsby 站点。
# install the Gatsby CLI globally
npm install -g gatsby-cli
# create a new Gatsby site using the default starter
gatsby new my-blazing-fast-site
但我有这个
error Couldn't find package "@reach/router@^1.1.1" required by "gatsby@^2.0.0" on the "npm" registry.
Error: Couldn't find package "@reach/router@^1.1.1" required by "gatsby-link@^2.0.0-rc.4" on the "npm" registry.
Error: Couldn't find package "@xtuc/ieee754@^1.2.0" required by "@webassemblyjs/ieee754@1.7.6" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/wast-printer@1.7.6" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/wast-parser@1.7.6" on the "npm" registry.
Error: Command failed: yarnpkg
- macOS High Sierra 10.13.6
- npm v5.6
其他projects/libs安装没有问题。
是我这边的问题吗?
npm 安装 --global gatsby-cli
gatsby 新的 gatsby-site https://github.com/gatsbyjs/gatsby-starter-default
npm login
将解决问题。
我在更新或安装后遇到了这个问题 mac Xcode。
尝试使用以下步骤更新到最新的节点版本:
1 - 卸载 Gatsby:
npm uninstall -g gatsby
2 - 删除您的项目:
小心!! (-r = 递归,-f = 强制)。这无法撤消。或者您可以手动删除该文件夹。
rm -r -f my-blazing-fast-site
3 - 将节点更新到最新版本(在本例中我的最新版本是 v11.15.0)
如果你使用 nvm 运行:
nvm ls-remote //check latest version
nvm install <version> // install
nvm use <version> // I skipped the first two steps and used my latest installed version > nvm use 11
4 - 重新安装 Gatsby:
npm install -g gatsby
5 - 创建一个新的 gatsby 项目
gatsby new my-blazing-fast-site
砰!您现在应该已经成功安装并创建了您的项目。
cd my-blazing-fast-site
gatsby develop
从 Gatsby 启动器创建一个 Gatsby 站点。
# install the Gatsby CLI globally
npm install -g gatsby-cli
# create a new Gatsby site using the default starter
gatsby new my-blazing-fast-site
但我有这个
error Couldn't find package "@reach/router@^1.1.1" required by "gatsby@^2.0.0" on the "npm" registry.
Error: Couldn't find package "@reach/router@^1.1.1" required by "gatsby-link@^2.0.0-rc.4" on the "npm" registry.
Error: Couldn't find package "@xtuc/ieee754@^1.2.0" required by "@webassemblyjs/ieee754@1.7.6" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/wast-printer@1.7.6" on the "npm" registry.
Error: Couldn't find package "@xtuc/long@4.2.1" required by "@webassemblyjs/wast-parser@1.7.6" on the "npm" registry.
Error: Command failed: yarnpkg
- macOS High Sierra 10.13.6
- npm v5.6
其他projects/libs安装没有问题。
是我这边的问题吗?
npm 安装 --global gatsby-cli
gatsby 新的 gatsby-site https://github.com/gatsbyjs/gatsby-starter-default
npm login
将解决问题。
我在更新或安装后遇到了这个问题 mac Xcode。
尝试使用以下步骤更新到最新的节点版本:
1 - 卸载 Gatsby:
npm uninstall -g gatsby
2 - 删除您的项目:
小心!! (-r = 递归,-f = 强制)。这无法撤消。或者您可以手动删除该文件夹。
rm -r -f my-blazing-fast-site
3 - 将节点更新到最新版本(在本例中我的最新版本是 v11.15.0) 如果你使用 nvm 运行:
nvm ls-remote //check latest version
nvm install <version> // install
nvm use <version> // I skipped the first two steps and used my latest installed version > nvm use 11
4 - 重新安装 Gatsby:
npm install -g gatsby
5 - 创建一个新的 gatsby 项目
gatsby new my-blazing-fast-site
砰!您现在应该已经成功安装并创建了您的项目。
cd my-blazing-fast-site
gatsby develop