Giter Site home page Giter Site logo

setup with next 14 about nextron HOT 9 OPEN

paras258 avatar paras258 commented on August 31, 2024 14
setup with next 14

from nextron.

Comments (9)

MemerGamer avatar MemerGamer commented on August 31, 2024 2

@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!

from nextron.

MemerGamer avatar MemerGamer commented on August 31, 2024 1

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.

from nextron.

gkorland avatar gkorland commented on August 31, 2024 1

@MemerGamer thanks for the update! @saltyshiomix any plans to support Next 14 in the near future?

from nextron.

saltyshiomix avatar saltyshiomix commented on August 31, 2024 1

@gkorland

Thank you for mention me :)

We hope to have Next.js v14 support by the end of May ๐Ÿ™‡

from nextron.

gkorland avatar gkorland commented on August 31, 2024 1

Would love to help/test it when you have something working

from nextron.

saltyshiomix avatar saltyshiomix commented on August 31, 2024 1

@gkorland

Thank you very much!
I will be sure to contact you when I release it :)

from nextron.

saltyshiomix avatar saltyshiomix commented on August 31, 2024 1

@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 :)

from nextron.

MemerGamer avatar MemerGamer commented on August 31, 2024

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"

from nextron.

saltyshiomix avatar saltyshiomix commented on August 31, 2024

@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,
  },
}

from nextron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.