gatsbyjs / gatsby-starter-documentation

This starter is for Gatsby v0 and is not maintained
67 stars 45 forks source link

Error: Cannot resolve module '.gatsby-context' #17

Open lwinkyawmyat opened 7 years ago

lwinkyawmyat commented 7 years ago

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
ryudice commented 7 years ago

Same here, any idea?

ericnograles commented 6 years ago

@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!

lwinkyawmyat commented 6 years ago

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

pandigita commented 6 years ago

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