I’m new to NGINX. I am trying to run my Node server with sudo pm2 start server.js
but I keep on getting MODULE_NOT_FOUND requireStack error. Everything’s fine when I run it to a local machine but when I run on nginx, this keeps happening. I can’t connect to my backend. Please, help.
I’m not sure if this will help, but when I also run node server.js
, I also get this error.
2
Answers
Solved! I uninstalled mongoose
npm uninstall mongoose
and re-installed itnpm install mongoose
.