Gatsby 未安装

标签 gatsby

正如标题所说,我尝试了阳光下的一切。删除/更新 NPM/node(包括文件夹 package-lock)、删除每个包、启动新文件夹、更改所有全局设置、更新所有全局设置。 (缓存清理/缓存验证)。更新了所有必需的插件

警告消息:

enter image description here

无论我位于全局文件夹还是新文件夹中,仍然收到相同的警告。是的,我有最新的 NPM,是的,我有管理员访问权限,是的,npm 中的全局更改显示了 js-core3,例如,但是当尝试运行 npm gatsby install 时仍然给我一个错误,说我正在运行旧版本js 核心。谁能帮助我?我在 PC 上,我只是想获取 gatsby YT 上显示的设置并运行命令 gatsby,但它不起作用

最佳答案

您需要适合some pre-requisites在您的计算机中安装 Gatsby,如果使用 Windows,还需要进行一些细微的调整。

  • 确保您已安装 Node

  • 确保您已安装 Git

  • 全局安装 Gatsby-cli:

    npm install -g gatsby-cli

    通过以下方式确保其正常工作:gatsby --help

    • Windows ,您可能需要添加:

      npm install --global windows-build-tools --vs2015

安装全局依赖项时,请确保关闭并重新打开终端以删除缓存。


The term 'gatsby' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

您可能会在 this GitHub thread 中找到一些解决方法.

关于 Gatsby 未安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64014280/

相关文章:

css - 自托管字体在 Gatsby 和 Safari 中不起作用

reactjs - Gatsby - 无法读取 null 的属性 'childImageSharp'

gatsby - 在 gatsby.js 上将 frontmatter markdown 转换为 html

reactjs - 使用 Gatsby 处理 URL 参数

javascript - GatsbyJS 在从其他组件呈现 GraphQL 查询时出现问题

routes - 带有语言键的 404 页面的 Gatsby 路由问题

reactjs - Apollo 客户端与 GatsbyJS 集成时遇到困难

reactjs - Gatsby "Multiple "root“queries found”中的多个查询错误

reactjs - gatsby 中的 this.props.history.push 相当于什么?

Gatsby 静态网站生成。 & 发布新内容