Hey, My Pm2 works fine but my web app won’t run. Then when I check the pm2 report, I get errored on status for both PM2 list and daemon logs. I am using pm2 version 3.2.2 and node version 8.0.0.
the code I run is pm2 start src/index.js
and it is a react web app
How can I solve this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
What are the exact errors that you get?
Also if you have not already checked the pm2
logs, I would recommend checking your pm2
logs with this command:
pm2 logs
If you are unsure, you could share the logs here so I could advise you further.
If there are no errors, then the problem might be with your application.
Also, as a side note here is also a quick video on how to deploy Node.js with PM2, Nginx as a reverse proxy, and Cloudflare for SSL termination:
Regards, Bobby
In my situation, I also met
pm2 errored
:As you can see above, I lost my
./config
file, because I added it into.gitignore
and when I cloned it on local machine, it lost.Just retrieve the file back, and the problem solved!
Hi, i am struggling with the same problem. my log error is below. Please advise where to go from here. Thanks in advance.
/root/.pm2/logs/server-error.log last 15 lines: 0|server | Require stack: 0|server | - /var/www/api.diegotrainer.com/html/dt-express-backend/server.js 0|server | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15) 0|server | at Module.Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29) 0|server | at require (internal/modules/cjs/helpers.js:72:18) 0|server | at Object.<anonymous> (/var/www/api.diegotrainer.com/html/dt-express-backend/server.js:120:32) 0|server | at Module._compile (internal/modules/cjs/loader.js:1137:30) 0|server | at Object.Module._extensions…js (internal/modules/cjs/loader.js:1157:10) 0|server | at Module.load (internal/modules/cjs/loader.js:985:32) 0|server | at Function.Module._load (internal/modules/cjs/loader.js:878:14) 0|server | at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:32:23) 0|server | at Module._compile (internal/modules/cjs/loader.js:1137:30) { 0|server | code: ‘MODULE_NOT_FOUND’, 0|server | requireStack: [ ‘/var/www/api.diegotrainer.com/html/dt-express-backend/server.js’ ] 0|server | }