My build has been failing since Aug 12, the reason says "TypeError [ERR_INVALID_URL]: Invalid URL"

My website

All of a sudden I noticed my builds have been failing since Aug 12th. The reason is always “TypeError [ERR_INVALID_URL]: Invalid URL”, the logs will say a different route every deployment and it will usually be a hard coded route at that. When I run ‘npm run build’ my build finishes fine, normally if my deployment fails i see the same error there, but this case is different. I cant tell if this is really an issue with my code or possibly something on netlifys end? I ran across a support post from 2 years ago and it was a thread of others with this same error saying their builds had just been failing out of nowhere. Has anyone experienced this?

Heres the past forum article i found: Getting weird error of nextjs in netlify

It’s the same error only insofar as both of the stack trace’s show the code running new URL

In the previous thread some Netlify code could clearly be seen executing:

/.netlify/functions-internal/___netlify-handler/___netlify-handler.js

I don’t see that in the stack trace you’ve supplied.

It only references to .next code and webpack.

Although I’d imagine the /get-started/contact-us/page.js is probably site code.

Did you make any changes to the site at or just prior to that time?

Do you spot anything odd in /get-started/contact-us?

Can you provide a link to your public repo?

I figured it out, i had added a url for the page as an env variable for the hosted sites url instead of the netlify version by mistake. once i updated that it worked, just took a really long time to figure out what it was.