Hello everyone,
I hope you're doing well. I'm currently facing an issue with my Node.js website on AAPanel (website > node project). I've successfully created a Node.js website using Next.js in development mode, and it works perfectly. However, when I attempt to convert it to production mode, I run into a problem.
The build process completes without any issues, but the trouble begins when I try to start the project. While the project appears to start successfully, AAPanel's Node.js page fails to detect the PID of the server. Here's the error message I'm receiving:
Failed to activate
- Local: http://localhost:3000 ✓ Ready in 508ms > booking@0.1.0 start > next start ▲ Next.js 13.5.5 - Local: http://localhost:3000 ✓ Ready in 490ms > booking@0.1.0 start > next start ▲ Next.js 13.5.5 - Local: http://localhost:3000 ✓ Ready in 484ms
I've checked if port 3000 is listening, and it is indeed in use. When I run the command lsof -i :3000, I get the following result:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
next-rout 3266741 www 19u IPv6 46644816 0t0 TCP *:3000 (LISTEN)
Additionally, I tried to access my website directly through its IP address and port (e.g., http://18...*:3000), and it's working as expected. However, within AAPanel's interface, it still shows that the project hasn't started.
I'm not quite sure why AAPanel is unable to detect the server PID and properly acknowledge that the project is up and running in production mode. I'd appreciate any help, insights, or suggestions from the community on how to resolve this issue.
Thank you in advance for your assistance.