gatsby - 使用 gatsby 创建新项目的命令不起作用
问题描述
我正在创建一个名为“new-app”的项目。成功安装 gatsby 后,我尝试运行命令“gatsby new my-app”。我总是收到一个错误,其中指出:
从 git 吃新网站时出错: https ://github.com/gatsbyjs/gatsby-starter-default.git
命令失败,退出代码 2 (ENOENT):git clone https://github.com/gatsbyjs/gatsby-starter-default.git my-app --single-branch spawn git ENOENT
错误:命令失败,退出代码 2(ENOENT):git clone https://github.com/gatsbyjs/gatsby-starter-default.git my-app --single-branch spawn git ENOENT
enoent.js:6 notFoundError [npm]/[gatsby-cli]/[cross-spawn]/lib/enoent.js:6:26
enoent.js:40 verifyENOENT [npm]/[gatsby-cli]/[cross-spawn]/lib/enoent.js:40:16
enoent.js:27 ChildProcess.cp.emit [npm]/[gatsby-cli]/[cross-spawn]/lib/enoent.js:27:25
child_process.js:248 Process.ChildProcess._handle.onexit internal/child_process.js:248:12
解决方案
我自己也遇到了这个。上周我擦了笔记本电脑,完全忘记了安装 git。问题解决了(无论如何,对我来说,希望对你也一样!)
推荐阅读
- vba - 分类后移动电子邮件
- python - 计算多标签注释的 Krippendorff Alpha
- dns - 如何设置子域 DNS 代理?
- python - 生成文件中意外标记附近的语法错误
- azure-data-factory - Azure 数据工厂 - 为找到的每个文件插入 Sql 行
- javascript - 动态更改的内容不会反映在 Bootstrap 模式中
- node.js - Binance Smart Chain safeTransferFrom 功能与转账评论不起作用
- pandas - 如何按小时快速过滤熊猫 DatetimeIndex
- javascript - 从 JavaScript 数组 Quizz App 中获取 40 个随机值。我在另一个文件 questions.js 中有 3000 个问题,我想随机得到 40 个问题
- javascript - 更改输入字段内的标签文本