I ran into an issue and I'm not sure if it's Prismic or a package that I'm using. Basically, when someone visits a specific on my site, I want to render a client-side component to show some confetti. Interestingly, it works perfectly fine when I run it locally. No issues there. But when I go to deploy it, or build the project locally and do an npm run start
, I don't get the effect.
Even weirder, in my Confetti component, I have 'use client' at the top and I've put in a console log into a useEffect just to see if I get a message. When I run it locally, same thing, I get the console message in the browser but interestingly, I also get it in the terminal (which makes me wonder if it's also running in the server?)
I've actually tried two different react packages for confetti and I got the same thing with both. It works locally but not when I deploy.
Has anyone ran into this before? Thanks.