Gatsby Develop failing : Error: Cannot find module 'gatsby-cli/lib/reporter'

余生颓废 提交于 2019-12-24 01:50:34

问题


Keep getting an error from gatsby-cli when doing gatsby develop command in terminal.

Already deleted node-modules and reinstalled using npm. Tried installing Gatsby-Cli as a separate module but that just causes more gatsby-cli errors. Gatsby-cli is a module inside the gatsby module, but I .really don't know why it's causing this error all of a sudden.

$ gatsby develop

success open and validate gatsby-configs - 0.054 s
error Error in


  Error: Cannot find module 'gatsby-cli/lib/reporter'

  - loader.js:582 Function.Module._resolveFilename
    internal/modules/cjs/loader.js:582:15

  - loader.js:508 Function.Module._load
    internal/modules/cjs/loader.js:508:25

  - loader.js:637 Module.require
    internal/modules/cjs/loader.js:637:17

  - v8-compile-cache.js:159 require
    [Webmaster-Portfolio]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - utils.js:15 Object.<anonymous>
    [Webmaster-Portfolio]/[gatsby-source-filesystem]/utils.js:15:18

  - v8-compile-cache.js:178 Module._compile
    [Webmaster-Portfolio]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - loader.js:712 Object.Module._extensions..js
    internal/modules/cjs/loader.js:712:10

  - loader.js:600 Module.load
    internal/modules/cjs/loader.js:600:32

  - loader.js:539 tryModuleLoad
    internal/modules/cjs/loader.js:539:12

  - loader.js:531 Function.Module._load
    internal/modules/cjs/loader.js:531:3

  - loader.js:637 Module.require
    internal/modules/cjs/loader.js:637:17

  - v8-compile-cache.js:159 require
    [Webmaster-Portfolio]/[v8-compile-cache]/v8-compile-cache.js:159:20

  - create-file-node.js:7 Object.<anonymous>
    [Webmaster-Portfolio]/[gatsby-source-filesystem]/create-file-node.js:7:18

  - v8-compile-cache.js:178 Module._compile
    [Webmaster-Portfolio]/[v8-compile-cache]/v8-compile-cache.js:178:30

  - loader.js:712 Object.Module._extensions..js
    internal/modules/cjs/loader.js:712:10

  - loader.js:600 Module.load
    internal/modules/cjs/loader.js:600:32



after I updated some packages I started getting this gastby-cli error. I've never seen it before and its really annoying. Don't know of a solution.


回答1:


Looks like something internal to Gatsby broke today, the Dev team is working on it

https://github.com/gatsbyjs/gatsby/issues/14875




回答2:


After I tried everything. I uninstalled everything and run npm install --save -g gatsby-cli does work for me



来源:https://stackoverflow.com/questions/56653027/gatsby-develop-failing-error-cannot-find-module-gatsby-cli-lib-reporter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!