pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

es-module from node/bin treated as commonJS module

Open mono424 opened this issue 2 years ago • 0 comments

I use the package serve which is a es-module since version 14.x. I ran into the problem that PM2 thinks the package is not a es-module package even-tough it is. So I am getting Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:

After some investigation I found out that pm2 loads the serve package from [...]/node/v14.20.0/bin. Its a binary and there is no package-json so PM2 fails to categorize.

Is there any way to fix this?

mono424 avatar Aug 18 '22 18:08 mono424