Ask coding questions

← Back to all posts
Issues with Gatsby/GraphQL Code from GitHub
noididntreadit (9)

I'm trying to set up a Gatsby/GraphQL/Markdown site following a YouTube tutorial (https://www.youtube.com/watch?v=6YhqQ2ZW1sc), which results in the code at https://github.com/bradtraversy/gatsby_crash_course.


Importing that with the Chorme Extension gave me this: https://repl.it/@noididntreadit/gatsbycrashcourse, but that fails to run. I think the problem there is related to the Makefile, because the major code changes here from the Gatsby replit starter seem to work if I manually pull them in. The Makefule wasn't included in other GitHub imports I've done but I can't delete. Any idea where that comes from?

The error is --- error There was a problem loading the local develop command. Gatsby may notbe installed in your site's "node_modules" directory. Perhaps you need to run "npm install"? You might need to delete your "package-lock.json" as well.
error Command failed with exit code 1 --- and deleting package-lock.json and/or yarn.lock doesn't help with that.


Working around the importing issue, if I copy the necessary parts to the Gatsby replit starter like I mentioned then the code will run. But the console mentions the app is available on localhost and it doesn't connect to the replit web window correctly.

Output:
You can now view gatsby-starter-default in the browser.
http://localhost:8000/
View GraphiQL, an in-browser IDE, to explore your site's data and schema
http://localhost:8000/___graphql

What controls that? I don't see anything usefully different in the package/node/config files I changed or the blog ones I added. https://repl.it/@noididntreadit/GatsbyJSDefaultTest

An unedited Gatsby project returns:
You can now view my-gatsby-app in the browser.
Local: http://0.0.0.0:8000/
On Your Network: http://172.18.0.8:8000/
View GraphiQL, an in-browser IDE, to explore your site's data and schema
http://0.0.0.0:8000/___graphql

And works in the browser. https://repl.it/@noididntreadit/ActualGatsbyDefault

Thanks!
Peter

Comments
hotnewtop
noididntreadit (9)

After importing some other code I realized that the malfunctioning import is showing the language as polygott instead of React, so maybe that is part of the problem. I'm still not sure about the deploying in the browser though.