Gatsby Site Can't Resolve

Help! My Gatsby site keeps failing and I’m lost as to why. I’m not sure what this means:

my site is:
this is my PR on github

It builds locally but not on Netlify

Dealing with the same issue. Gatsby won’t build on production, but I can run it just fine on my local, and I can even deploy from the cli, but it keeps failing with the same error, on the dashboard.

hi @kaleigh , the error messages are inferring you are trying to access some json files from your components folder.

are these json files in the right place? this seems to be an issue with paths, maybe?

hi @luchoster - you are getting the same build error as kaleigh but your problem is originating somewhere else, i think. in your case the problem is that projectId isn’t being found for some reason.

is this maybe an environment variable that hasn’t been added to netlify?

you might also check that case isn’t causing problems:

Hi @perry it looks like it’s related to this issue, but I was able to fix it by clearing cache and retrying the build (facepalm, normally I do that!). After clearing it ran successfully.

1 Like

Sorry @perry I forgot to respond to this.

So… the issue was an environment variable name, because the vars need to start with GATSBY_ so the project can read it :man_facepalming:t4: