saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.97k stars 229 forks source link

Build fails for antd-typescript #194

Closed maddygoround closed 3 years ago

maddygoround commented 3 years ago

Hi,

We are trying to build the app and resulting in the following error

- Generating static pages (0/4)
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot assign to read only property 'children' of object '#<Object>'

Not sure what could be the cause.

maddygoround commented 3 years ago

It's an issue with _document.tsx file, once I removed it I am able to run the app.

After building the app I am not able to see anything on the screen. It just show the blank screen.

saltyshiomix commented 3 years ago

@maddygoround

Thank you for reporting the issue!

Could you try nextron v7 or this example ?

saltyshiomix commented 3 years ago

@maddygoround

I can't reproduce this problem, so I close this issue for now.

If any updates, feel free to reopen the issue :)

cellis commented 1 year ago

I was able to reproduce, and ultimately solve this issue. The problem was I had NODE_ENV=development set in my .zshrc file. Nextron does set NODE_ENV=production, in the webpack build but electron build will take system NODE_ENV. So I needed to build with NODE_ENV=production nextron build. HTH someone searching.