Enabling Node v18 in Vercel for Gatsby v5
Vercel just added Node v18 support, most likely due to Gatsby v5 using it. Here's how you can switch to it:
Go to "General" settings on your Vercel project and find the option for "Node.js Version". Set it to v18.
Thats it! You will most likely have to do a full cache clear build in order for it to build.
If you encounter "Conflicting peer dependency" error, you need to add --legacy-peer-deps to your Vercel install options like this: