saltyshiomix / nextron

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

error: unknown option '-o' #467

Closed msamgan closed 4 months ago

msamgan commented 5 months ago

error: unknown option '-o'

Cannot build electron packages: Error: Command failed with exit code 1: next export -o /Users/msamgan/Projects/digilink/mns_offline/app /Users/msamgan/Projects/digilink/mns_offline/renderer

I am facing this. Can anyone help me in this.

it was working like a few days ago.

msamgan commented 5 months ago

moreover ⨯ next export has been removed in favor of 'output: export' in next.config.js. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports

please can we make an update in the package regarding this.

msamgan commented 5 months ago

the issue is in next 14. it works with next 13.

arabovs commented 5 months ago

Here's the actual nextjs error: "next export" does not work with App Router. Please use "output: export" in next.config.js https://nextjs.org/docs/advanced-features/static-html-export error Command failed with exit code 1.

saltyshiomix commented 5 months ago

Hi, @msamgan , sorry for late reply.

I just released nextron v9.0.0 and v8.24.0. So could you try these versions?

saltyshiomix commented 5 months ago

@arabovs

Sorry for inconvenience. Could you try nextron v9 or v8.24.0?

arabovs commented 5 months ago

Thanks @saltyshiomix , will test today

msamgan commented 5 months ago

ok. is there any special migration guide, anything special to take care while updating ?

saltyshiomix commented 5 months ago

@msamgan

Sorry for inconvenience!

Please follow this(update next.config.js): https://github.com/saltyshiomix/nextron/issues/442#issuecomment-2171149218

msamgan commented 5 months ago

thanks, i will make the appropriate updates and will get back to you.

saltyshiomix commented 5 months ago

@msamgan

Thank you very much, too!

Feel free to mention me.

saltyshiomix commented 5 months ago

@msamgan Any updates? If you have troubles, feel free to ask me :)

saltyshiomix commented 4 months ago

If you have any troubles, feel free to open the issue :)

alieldeba commented 3 months ago

@saltyshiomix I am working with next.js app router and when I write "output": "export" in next.config.js the middleware.ts file does not work and when I remove the "output": "export" the build does not work.

what should I do ?

msamgan commented 3 months ago

try changing version back to 13, that worked for me.

alieldeba commented 3 months ago

To all who is struggling with nextron just read this article it will fix all your problems. https://www.saybackend.com/blog/03-electron-nextjs-ssr

You will go back to nextjs 14 after this blog @msamgan

msamgan commented 3 months ago

thanks @alieldeba. I will have a look.