Receiving node version error when accessing a 404 page

It was brought to my attention that our site was not being indexed by Google because the robots text was not present and not giving a 404 error due to the site outputting a Netlify error instead.

In my environment flags I already have NPM_VERSION as 16.15.0 so I am not sure what to do next. Keep in mind the site works, only when the page/asset doesn’t exist does it throw the error.

Did you try updating the Gatsby plugin: Netlify App?