NPM run build error - Cannot read properties of undefined reading plausibleAnalytics
Author: ClydeDzCreated Sep 10, 2025Updated Sep 12, 2025
I get this error when I run npm run build. Why is this?
Error occurred prerendering page "/tags/Spotify/page/1". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of undefined (reading 'plausibleAnalytics')
at h (D:\Code\monorepo\blog\.next\server\chunks\486.js:21:700)
at ek (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:13337)
at e (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:17246)
at e$ (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:17708)
at Array.toJSON (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:14854)
at stringify (<anonymous>)
at eF (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:26079)
at eq (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:26391)
at ez (D:\Code\monorepo\blog\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:17:26887)
at AsyncLocalStorage.run (node:async_hooks:346:14)
Export encountered an error on /tags/[tag]/page/[page]/page: /tags/Spotify/page/1, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: nullSource: timlrx/tailwind-nextjs-starter-blog