gatsby-starter-default gives error on gatsby develop

Created on 19 Jun 2019  Â·  7Comments  Â·  Source: gatsbyjs/gatsby

Experiencing and error on running 'gatsby develop' and also 'npm run develop'.

Steps to reproduce

  1. Clone the repo from github
    gatsby new [name of project]

  2. cd [name of project]

  3. gatsby develop OR npm run develop

Expected result

Site should be deployed on local host(localhost:8000)

Actual result

error Error in "/Users/tanyatandon/Documents/netlifyCMS-test/test/node_modules/gatsby-source-files

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
    [test]/[v8-compile-cache]/v8-compile-cache.js:159:20

  • utils.js:15 Object.
    [test]/[gatsby-source-filesystem]/utils.js:15:18

  • v8-compile-cache.js:178 Module._compile
    [test]/[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
    [test]/[v8-compile-cache]/v8-compile-cache.js:159:20

  • create-file-node.js:7 Object.
    [test]/[gatsby-source-filesystem]/create-file-node.js:7:18

  • v8-compile-cache.js:178 Module._compile
    [test]/[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
    [test]/[v8-compile-cache]/v8-compile-cache.js:159:20

  • gatsby-node.js:12 Object.
    [test]/[gatsby-source-filesystem]/gatsby-node.js:12:19

  • v8-compile-cache.js:178 Module._compile
    [test]/[v8-compile-cache]/v8-compile-cache.js:178:30

â ‹ load plugins

Environment

System:
OS: macOS High Sierra 10.13.6
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
npm: 6.4.1 - /usr/local/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 74.0.3729.131
Safari: 12.1
npmPackages:
gatsby: ^2.9.6 => 2.9.6
gatsby-image: ^2.1.4 => 2.1.4
gatsby-plugin-manifest: ^2.1.1 => 2.1.1
gatsby-plugin-offline: ^2.1.3 => 2.1.3
gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
gatsby-plugin-sharp: ^2.1.6 => 2.1.6
gatsby-source-filesystem: ^2.0.40 => 2.0.40
gatsby-transformer-sharp: ^2.1.21 => 2.1.21
npmGlobalPackages:
gatsby: 2.9.9

Most helpful comment

Alright, since I believe this has been resolved, I'm closing the issue.

For those who have this similar issue and come upon this in the future, update your dependencies to at least the ones described in https://github.com/gatsbyjs/gatsby/commit/8457e706ca380e6bb8d115817ae43e9d786dc389.

The starters now have these fixes.

All 7 comments

So this may be related to issue https://github.com/gatsbyjs/gatsby/issues/14875

Try updating gatsby-source-filesystem to 2.0.42 and see if this issue has been fixed

Changed "gatsby-source-filesystem": "^2.0.40", to "gatsby-source-filesystem": "^2.0.42",
Did 'npm install' and then 'gatsby develop'

Now the error changes to:

Error in "/Users/tanyatandon/Documents/netlifyCMS-test/test/node_modules/gatsby-transformer-

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

So the publish of PR that fixed the issue I mentioned had other packages updated as well so I would say read through this commit and update any of them that you are using: https://github.com/gatsbyjs/gatsby/commit/8457e706ca380e6bb8d115817ae43e9d786dc389

Gosh! Thanks
Updated
"gatsby": "^2.9.6", ==> "gatsby": "^2.9.8"
"gatsby-plugin-sharp": "^2.1.6" ==> "gatsby-plugin-sharp": "^2.1.8"
"gatsby-source-filesystem": "^2.0.40", ==> "gatsby-source-filesystem": "^2.0.42",

Now 'gatsby develop' works.

I would request you to please update these packages in the gatsby-starter-default repository because i just cloned that and ran 'gatsby develop'.

Weird, I get the latest gatsby packages when running gatsby new my-cool-starter.

  npmPackages:
    gatsby: ^2.9.9 => 2.9.9
    gatsby-image: ^2.1.4 => 2.1.4
    gatsby-plugin-manifest: ^2.1.1 => 2.1.1
    gatsby-plugin-offline: ^2.1.3 => 2.1.3
    gatsby-plugin-react-helmet: ^3.0.12 => 3.0.12
    gatsby-plugin-sharp: ^2.1.9 => 2.1.9
    gatsby-source-filesystem: ^2.0.43 => 2.0.43
    gatsby-transformer-sharp: ^2.1.21 => 2.1.21

Yup. Saw that a PR has been merged an hour ago and I cloned it 2 hours ago :-D

https://github.com/gatsbyjs/gatsby-starter-default/commit/4da848aa3ac65332ab65d305101a53699dc493e8
Thanks

Alright, since I believe this has been resolved, I'm closing the issue.

For those who have this similar issue and come upon this in the future, update your dependencies to at least the ones described in https://github.com/gatsbyjs/gatsby/commit/8457e706ca380e6bb8d115817ae43e9d786dc389.

The starters now have these fixes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimfilippou picture jimfilippou  Â·  3Comments

magicly picture magicly  Â·  3Comments

3CordGuy picture 3CordGuy  Â·  3Comments

totsteps picture totsteps  Â·  3Comments

dustinhorton picture dustinhorton  Â·  3Comments