Open paras258 opened 9 months ago
I somehow managed to set up the base project with the latest electron
and NextJS
on node v20.12.2
(Currently trying to resolve the build process, development build is succesfull, but production build fails)
The steps i followed:
Note: I run npm install
frequently to check if the electron builder fails
Updated electron version with the following command:
npm install electron@latest
npm install
Updated to NextJS13 (I think this can be optional, but made sure to do v12 to v13 instead of straight up moving to v14)
npm i next@13 react@latest react-dom@latest eslint-config-next@13
npm install
Updated to NextJS14
npm i next@latest react@latest react-dom@latest eslint-config-next@latest
npm install
Here I tested if the app works with dev build by running
npm run dev
I needed to update some outdated code parts that were modified from Next v12 to v14 like including <a>
tags in <Link>
has become legacy stuff, so i removed the unnecessary anchor tags
I hope this helps, currently I am trying to resolve some build problems, since next export
command was removed in favor of output: "export"
Update on this, even though i tried creating custom NextJS configuration the build step is too tied to nextron which makes things complicated even when trying to build the app via the native electron builder.
So the current best thing we can do is to use the NextJS v13 until nextron support officially v14.
@MemerGamer thanks for the update! @saltyshiomix any plans to support Next 14 in the near future?
@gkorland
Thank you for mention me :)
We hope to have Next.js v14 support by the end of May 🙇
Would love to help/test it when you have something working
@gkorland
Thank you very much! I will be sure to contact you when I release it :)
@paras258 @MemerGamer @gkorland
Sorry for late reply and inconvenience.
I just released nextron v9.0.0, which supports next.js v13 and v14. If you have time, please try it :)
NOTE:
Please update renderer/next.config.js as belows:
module.exports = {
output: 'export',
// we want to change distDir to "app" so as nextron can build the app in production mode!
distDir: process.env.NODE_ENV === 'production' ? '../app' : '.next',
trailingSlash: true,
images: {
unoptimized: true,
},
}
@saltyshiomix just updated my project to the latest Next.js (v14.2.4) and the latest nextron (9.1.0) version using Node v20.15.0 and it works great!
@saltyshiomix just updated my project to the latest Next.js (v14.2.4) and the latest nextron (9.1.0) version using Node v20.15.0 and it works great!
Thank you for trying it! If you have any troubles, feel free to contact me :)
Error: Page "/demo/service/[id]" is missing "generateStaticParams()" so it cannot be used with "output: export" config. in next js 14 app
@saltyshiomix just updated my project to the latest Next.js (v14.2.4) and the latest nextron (9.1.0) version using Node v20.15.0 and it works great!
Error: Page "" is missing "generateStaticParams()" so it cannot be used with "output: export" config. have you get any error like this when run build
Does anyone have idea how to setup nextron with next 14?