Next.js Discord

Discord Forum

Facing Deployment Error on Vercel — Works Fine Locally|

Answered
jayan110105 posted this in #help-forum
Open in Discord
I’m encountering an issue while deploying my project to Vercel. The application runs perfectly on my local machine, but the deployment process keeps failing, and I can't figure out why.
Answered by joulev
it wont break anything... yet

but considering node 18 will be deprecated in april 2025, i would try React.lazy or next/dynamic (the workarounds they shared in that thread) first and see if it works for you

import dynamic from 'next/dynamic';
const Lottie = dynamic(() => import('react-lottie'), { ssr: false });
View full answer

12 Replies

@joulev https://nextjs-faq.com/browser-api-client-component
I am not using any browser-api-client
@jayan110105 I am not using any browser-api-client
hmm what is your / page code? could you share it
if you are not using it, seems like one of the components you use is using it
@joulev if you are not using it, seems like one of the components you use is using it
I checked every component to make sure I am not using browser specific API
Thank you so much
Just a question should I change the node version to 18.x or will it break anything else
@jayan110105 Just a question should I change the node version to 18.x or will it break anything else
it wont break anything... yet

but considering node 18 will be deprecated in april 2025, i would try React.lazy or next/dynamic (the workarounds they shared in that thread) first and see if it works for you

import dynamic from 'next/dynamic';
const Lottie = dynamic(() => import('react-lottie'), { ssr: false });
Answer
It worked! Thank you so much for your patience—you have no idea how much of a headache you've saved me.
you're welcome