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!