Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gatsby 盖茨比:运行错误“;盖茨比——帮助”;安装node、Homebrew和npm后_Gatsby - Fatal编程技术网

Gatsby 盖茨比:运行错误“;盖茨比——帮助”;安装node、Homebrew和npm后

Gatsby 盖茨比:运行错误“;盖茨比——帮助”;安装node、Homebrew和npm后,gatsby,Gatsby,在全局成功安装Node(v13.5.0)、npm(v6.13.4)、Homebrew(v2.2.1)和Gatsby cli后,我遇到以下错误: $ gatsby --help /usr/local/lib/node_modules/gatsby-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53 throw ex; ^ Error: Cannot find mod

在全局成功安装Node(v13.5.0)、npm(v6.13.4)、Homebrew(v2.2.1)和Gatsby cli后,我遇到以下错误:

$ gatsby --help
/usr/local/lib/node_modules/gatsby-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Cannot find module '@babel/code-frame'
Require stack:
- /usr/local/lib/node_modules/gatsby-cli/lib/reporter/prepare-stack-trace.js
- /usr/local/lib/node_modules/gatsby-cli/lib/reporter/errors.js
- /usr/local/lib/node_modules/gatsby-cli/lib/reporter/index.js
- /usr/local/lib/node_modules/gatsby-cli/lib/create-cli.js
- /usr/local/lib/node_modules/gatsby-cli/lib/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/gatsby-cli/lib/reporter/prepare-stack-trace.js:13:19)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Module.require (internal/modules/cjs/loader.js:1028:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/gatsby-cli/lib/reporter/prepare-stack-trace.js',
    '/usr/local/lib/node_modules/gatsby-cli/lib/reporter/errors.js',
    '/usr/local/lib/node_modules/gatsby-cli/lib/reporter/index.js',
    '/usr/local/lib/node_modules/gatsby-cli/lib/create-cli.js',
    '/usr/local/lib/node_modules/gatsby-cli/lib/index.js'
  ]
}
$gatsby——帮助
/usr/local/lib/node_modules/gatsby cli/node_modules/yoga-layout-prebuild/yoga-layout/build/Release/nbind.js:53
掷骰子;
^
错误:找不到模块“@babel/code frame”
需要堆栈:
-/usr/local/lib/node_modules/gatsby cli/lib/reporter/prepare-stack-trace.js
-/usr/local/lib/node_modules/gatsby cli/lib/reporter/errors.js
-/usr/local/lib/node_modules/gatsby cli/lib/reporter/index.js
-/usr/local/lib/node_modules/gatsby cli/lib/create-cli.js
-/usr/local/lib/node_modules/gatsby cli/lib/index.js
位于Function.Module.\u resolveFilename(internal/modules/cjs/loader.js:966:17)
at Function.Module._load(内部/modules/cjs/loader.js:859:27)
at Module.require(内部/modules/cjs/loader.js:1028:19)
根据需要(内部/modules/cjs/helpers.js:72:18)
反对。(/usr/local/lib/node_modules/gatsby cli/lib/reporter/prepare stack trace.js:13:19)
at模块编译(内部/modules/cjs/loader.js:1139:30)
at Object.Module._extensions..js(internal/modules/cjs/loader.js:1159:10)
在Module.load(内部/modules/cjs/loader.js:988:32)
at Function.Module._load(内部/modules/cjs/loader.js:896:14)
at Module.require(内部/modules/cjs/loader.js:1028:19){
代码:“未找到模块”,
requireStack:[
“/usr/local/lib/node_modules/gatsby cli/lib/reporter/prepare stack trace.js”,
“/usr/local/lib/node_modules/gatsby cli/lib/reporter/errors.js”,
“/usr/local/lib/node_modules/gatsby cli/lib/reporter/index.js”,
“/usr/local/lib/node_modules/gatsby cli/lib/create cli.js”,
“/usr/local/lib/node_modules/gatsby cli/lib/index.js”
]
}
我遗漏了什么?
谢谢

我不知道为什么会出现问题,但您可以使用以下方法将缺少的模块安装到项目中:

npm install --save-dev babel-code-frame

你安装了盖茨比1号还是2号?我安装了盖茨比-cli@2.8.21