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.
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.
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.
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.
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