I recently faced this error while working with gatsby and couldn’t find anything substantial as a result so here are a list of things you can do to solve it -
Clean you global Gatsby sites folder to rebuild
Delete the ~/.config/gatsby/sites folder
1rm -rf ~/.config/gatsby/sites
or on Windows delete this folder :-
1C:\Users\[your name]\.config\gatsby\sites
Clean Gatsby Cache
1gatsby clean
Run ps aux to see if gatsby is still running on any port
1ps aux | grep gatsby
If you see any result kill those processses and try gatsby develop again.
Last resort
What worked for me after updating gatsby-cli and gatsby, was to initialize new test project with gatsby new your-project-name somewhere else (just to test if the new starter would work).
Run gatsby develop, it should start the dev server, open it on http://localhost:8000. Now cmd/ctrl+c to close it and you can delete that test project.
Now go back to your project that didn’t work and try gatsby develop, everything should work now.
For more such bug fixes and javascript advices follow the newsletter below :).





