Reputation: 1
My npm run build is not working while I can use npm run dev. Here is an errors.
C:\Users\sawettachats\receiving-mat>npm run build
Error occurred prerendering page "/profile/addData". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Unsupported Server Component type: {...}
at e (C:\Users\sawettachats\receiving-mat\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:138095)
at ek (C:\Users\sawettachats\receiving-mat\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:138145)
at Array.toJSON (C:\Users\sawettachats\receiving-mat\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:135755)
at stringify (<anonymous>)
at eR (C:\Users\sawettachats\receiving-mat\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:142219)
at eE (C:\Users\sawettachats\receiving-mat\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:142698)
at AsyncLocalStorage.run (node:async_hooks:346:14)
at Timeout._onTimeout (C:\Users\sawettachats\receiving-mat\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:150397)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
✓ Generating static pages (8/8)
> Export encountered errors on following paths:
/profile/addData/page: /profile/addData
/profile/page: /profile
both /profile/addData/page:/profile/addData and /profile/page: /profile I use export defual to both page components and both are client side rendering. How to fix this problem?
I want to use npm run build. Now it's now working as I expected.
Upvotes: 0
Views: 88