Getting "ReferenceError: navigator is not defined" in Next.js app

Getting error - ReferenceError: navigator is not defined error from Plasmic in development and production for our NextJS app

3:18:27 PM: Error occurred prerendering page "/". Read more: <>
3:18:27 PM: ReferenceError: navigator is not defined
3:18:27 PM:     at factory (eval at load (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:14933), <anonymous>:3:2966)
3:18:27 PM:     at eval (eval at load (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:14933), <anonymous>:3:277419)
3:18:27 PM:     at eval (eval at load (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:14933), <anonymous>:3:277430)
3:18:27 PM:     at Registry.load (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:15023)
3:18:27 PM:     at requireFn (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:14843)
3:18:27 PM:     at eval (eval at load (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:14933), <anonymous>:3:279)
3:18:27 PM:     at Registry.load (/opt/build/repo/node_modules/@plasmicapp/loader-core/dist/loader-core.cjs.production.min.js:1:15023)
3:18:27 PM:     at t.e.getComponent (/opt/build/repo/node_modules/@plasmicapp/loader-react/dist/loader-react.cjs.production.min.js:1:11749)
3:18:27 PM:     at T (/opt/build/repo/node_modules/@plasmicapp/loader-react/dist/loader-react.cjs.production.min.js:1:22438)
3:18:27 PM:     at Q (/opt/build/repo/node_modules/@plasmicapp/loader-react/dist/loader-react.cjs.production.min.js:1:23381)
3:18:27 PM:     at d (/opt/build/repo/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:33:498)
3:18:27 PM:     at bb (/opt/build/repo/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
3:18:27 PM:     at a.b.render (/opt/build/repo/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
3:18:27 PM:     at (/opt/build/repo/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
3:18:27 PM:     at Object.exports.renderToString (/opt/build/repo/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:52:138)
3:18:27 PM:     at Object.renderPage (/opt/build/repo/node_modules/next/dist/server/render.js:736:46)

I tried upgrading to the latest loader-nextjs with the same outcome

hmm can I see this error somewhere on a live site?

No our production site just continues to serve the last working version

ah so this is during build?


This is from our netlify production build log

any chance you could share access to the git repo with us?

I don’t think that would be possible, no

do you know the timestamp for when this started happening?

Our current production site appears to be able to rebuild after revalidate expires

So no errors there

Last successful deployment Mar 8 at 7:49 AM AU time

First recorded failure today 12:48PM

So a 2 day window

I have tried building the last production release and I get the same issue, so it’s not due to code changes in our repo

It only seems to affect the homepage plasmic component

Project ID: 4oePdgY6VCnvZ6K6n5P4Sx

I tried some previous published versions and got the same error no matter how far I went back

appears to be an issue with the lottie components during SSR…

appears to be this:

I’m bumping the version of lottie-web we are using to include the fix