gatsby-starter-documentation icon indicating copy to clipboard operation
gatsby-starter-documentation copied to clipboard

Error: Cannot resolve module '.gatsby-context'

Open lwinkyawmyat opened this issue 7 years ago • 4 comments

  • gatsby-cli "v1.0.12"
  • gatsby-starter-documentation "v1.0.0"
  • gatsby "v0.12.45"

When I run below command

gatsby new my-doc https://github.com/gatsbyjs/gatsby-starter-documentation
cd my-doc
gatsby develop

I got below error

ERROR in ./~/gatsby/dist/utils/web-entry.js
Module not found: Error: Cannot resolve module '.gatsby-context' in ~/Documents/my-doc/node_modules/gatsby/dist/utils
 @ ./~/gatsby/dist/utils/web-entry.js 26:18-44

lwinkyawmyat avatar Aug 20 '17 05:08 lwinkyawmyat

Same here, any idea?

ryudice avatar Aug 25 '17 16:08 ryudice

@ubatin @ryudice looks like the author used an old version of gatsby and added it as a dependency.

Instead of running your global gatsby develop (which I'm presuming you're doing), try executing ./node_modules/.bin/gatsby develop instead.

Looks like there's already an issue to upgrade this to 1.x (#16). I actually may take a stab at that, as I'd like to get to know Gatsby a bit under the hood.

Good luck!

ericnograles avatar Oct 15 '17 13:10 ericnograles

hi @ericnograles, I'll try with your recommend. I'll will tell about the result. 👍 👍 👍

lwinkyawmyat avatar Oct 20 '17 03:10 lwinkyawmyat

The solution by ericnograles worked for me! (I had the same error, working with a 0.x version of gatsby).

pandigita avatar Dec 13 '17 10:12 pandigita