Build error gatsby

Sup peeps,

Anyone with experience with React/Gatsby have any clue why this may be happening, I think I need to set GATSBY_NEWRELIC_ENV=something? running Ubuntu 20.04 via WSL2. Any help would be appreciated :upside_down_face:

double check how you installed gatsby because it says it is not recognized as a command from your shell

Cheers for the response… Seems someone used a work around and got it working with

cp ./src/local.runtimeConfig.json ./public/runtimeConfig.json
set GATSBY_NEWRELIC_ENV=dev
gatsby develop

I’ve been told my gatsby is fine and “npm run develop” , should work just the same but it still throws the same error. Any ideas?

how precisely was gatsby installed?

Did you follow an official guide?

If NPM cannot see it then it might be an issue with your PATH.

Hey cheers buddy, was just a a path issue when running on windows seems to be working fine…

On ubuntu WSL2 though, I attempted to do the same thing setting gastbsy/gatsby cli to global but get the following. I tried npm install and removed pack-lock.json but it still returns the same error. Any ideas? I’ve also tried npm install --force

image

Ngl you should switch to yarn.

And don’t forget to pass the global flag in you intend to install system wide.

1 Like

Yeet! thanks man removed package-lock, yarn install all good

1 Like

Glad I could help.

Happy coding!