Next.js Pitfall Record

Deployment

Deployment Method

Similar to Express, after compilation, run the npm run start command, and configure the server for reverse proxy.

Port Occupation

By default, Next.js uses port 3000 in the development environment. If you execute the npm run start command at this time, it will prompt that the port is occupied. You can change the start command in the package.json file as follows:

1npm run start -p <port>

i18n Feature Does Not Support Static Export

Unfortunately, it can only be hosted on a server.