-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with pm2: Cannot find module 'esm' #861
Comments
HI @dhowe, did you manage to solve this issue? |
I think (it was > 5 month ago that I posted this ticket) that removing the 'instances' field did it, though better documentation would have been useful.
|
@david-saint I had an issue, where everything worked in fork mode, but cluster mode did not. Turns out all I had to do was make a node_modules folder in ~/.pm2
No clue why this happens. A lot of frustrating hours wasted. |
Same issue here, solved by changing from cluster mode to fork as suggested by @dhowe. No idea why this happens, seems to be a new bug since I'm pretty sure this has worked before. |
For some reason the The way I could solve this particular issue, with no working-around needed (preserving everything in my project as it was):
After the above, |
Super weird issue but @rellampec 's response worked for me. Has anybody notified PM2? |
For some reason @rellampec response worker here too! |
For anyone still looking at this in 2022, I solved it by installing the esm package at the project root with; Try this if all else fails. I think pm2 searches for the esm package at the project root not in the project folder. |
@AugustodeAraujo good point. Issue reported here |
Launched via $ pm2 start ecosystem.config.js, with config:
Please copy/paste the above report in your issue on https://github.com/Unitech/pm2/issues
The text was updated successfully, but these errors were encountered: