thelovesmith
thelovesmith

Reputation: 639

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

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.

Upvotes: 2

Views: 2313

Answers (4)

CyberMessiah
CyberMessiah

Reputation: 1268

I saw the same error these days when trying to launch a Starter Template. What worked for me is first to up the version of gatsby on package.json ( "gatsby": "^2.24.42", ). Then just remove the package-lock and do the npm-install. On my side that fixed the error.

Upvotes: 0

Muhammed Moussa
Muhammed Moussa

Reputation: 5205

try to update gatsby version

npm i gatsby

Upvotes: 0

MD SHAYON
MD SHAYON

Reputation: 8063

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

Upvotes: 0

Aidan Grimshaw
Aidan Grimshaw

Reputation: 86

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

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

Upvotes: 1

Related Questions