Ideas

Give us your best ideas!

Publish a nextjs app as a React development build

Today when you publish a nextjs app to Litium Cloud it is always published as a React production build. To a test environment you would like to instead publish a development build so that you can debug and get detailed error messages.

  • Henrik Lundin
  • Jan 31 2024
  • Not right now
  • Attach files
  • Christian Norrman commented
    11 May 13:17

    You can remote debug in a sense if you configure the environment to point to the app where your nextjs app resides. Then use the same commit as you used when you deployed to the environment. Then run nextjs locally to "debug" the state of the application. As Nextjs is stateless this is a good approach, nextjs does not store data in between request which is why it is stateless. It is only the data from the API which is really needed to debug.

    Nextjs by default always sets production mode when building. This cannot really be changed in a good way and honestly it is better to run the app in production mode as Nextjs handles caching differently in production mode and development mode.

  • Admin
    Ludvig Block commented
    09 Apr 12:39

    Hi,


    Our idea is that you should debug and develop locally and that the build in the test environment should be promoted to the production environment when ready. Even if you create a development build in the test environment, you will not be able to connect to the remote debug port.


    / Patric