简体   繁体   中英

PM2 cluster mode Cannot find module

I used pm2 for run my nodejs application for production in cluster mode.

The problem is after I check the error logs I find these weird logs:

Cannot find module 'winston'
Cannot find module '@turf/destination'
Cannot find module 'apollo-server-redis'
Cannot find module ...

They are just random package names and I have installed theme and they work fine but only SOMETIMES they act weird and cause problem in my web application.

Is this problem related to PM2 or my packages or my code?

What should I do?

尝试sudo pm2 update -可能是您的node_modules文件夹也不在正确的文件夹中...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM