Next.js Discord

Discord Forum

Facing Deployment Error on Vercel — Works Fine Locally|

Answered
jayan110105 posted this in #help-forum
Open in Discord
Avatar
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.
Image
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

Avatar
I am not using any browser-api-client
Avatar
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
I checked every component to make sure I am not using browser specific API
Avatar
this is due to lottie-react, check here: https://github.com/Gamote/lottie-react/issues/101
Avatar
Thank you so much
Just a question should I change the node version to 18.x or will it break anything else
Avatar
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
Avatar
It worked! Thank you so much for your patience—you have no idea how much of a headache you've saved me.
Avatar
you're welcome