Unitech / Unitech/pm2

pm2 not working with esm on windows 10, there are no workarounds!

Open
#4,819 15 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

What's going wrong?

https://github.com/Unitech/pm2/issues/4688
Issue is closud but not solved, now it is not possible to use pm2 on windows 10 with esm modules.

How could we reproduce this issue?

Try to run nodejs script in esm module format

Supporting information

PS D:\vrnet\VRnet\web\add> pm2 report

--- PM2 report ----------------------------------------------------------------
Date : Tue Aug 18 2020 20:14:39 GMT+0300 (Москва, стандартное время)

--- Daemon -------------------------------------------------
pm2d version : 4.4.1
node version : 14.8.0
node path : not found
argv : D:\Program Files\nodejs\node.exe,C:\Users\Forux\AppData\Roaming\npm\node_modules\pm2\lib\Daemon.js
argv0 : node
user : undefined
uid : N/A
gid : N/A
uptime : 55min

--- CLI ----------------------------------------------------
local pm2 : 4.4.1
node version : 14.8.0
node path : not found
argv : D:\Program Files\nodejs\node.exe,C:\Users\Forux\AppData\Roaming\npm\node_modules\pm2\bin\pm2,report
argv0 : D:\Program Files\nodejs\node.exe
user : Forux

--- System info --------------------------------------------
arch : x64
platform : win32
type : Windows_NT
cpus : Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
cpus nb : 8
freemem : 19485593600
totalmem : 34235043840
home : C:\Users\Forux

--- PM2 list -----------------------------------------------
┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
└─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

--- Daemon logs --------------------------------------------
C:\Users\Forux.pm2\pm2.log last 20 lines:
PM2 | 2020-08-18T20:02:48: PM2 log: pid=14132 msg=process killed
PM2 | 2020-08-18T20:02:48: PM2 log: App [uploadModels:0] starting in -fork mode-
PM2 | 2020-08-18T20:02:48: PM2 log: App [uploadModels:0] online
PM2 | 2020-08-18T20:02:53: PM2 log: [Watch] Stop watching uploadModels
PM2 | 2020-08-18T20:02:53: PM2 log: Stopping app:uploadModels id:0
PM2 | 2020-08-18T20:02:53: PM2 log: App [uploadModels:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-08-18T20:02:53: PM2 log: pid=17164 msg=process killed
PM2 | 2020-08-18T20:02:54: PM2 log: [Watch] Start watching uploadModels
PM2 | 2020-08-18T20:02:54: PM2 log: App [uploadModels:0] starting in -fork mode-
PM2 | 2020-08-18T20:02:54: PM2 log: App [uploadModels:0] online
PM2 | 2020-08-18T20:04:31: PM2 log: Change detected on path server.log for app uploadModels - restarting
PM2 | 2020-08-18T20:04:31: PM2 log: Stopping app:uploadModels id:0
PM2 | 2020-08-18T20:04:31: PM2 log: App [uploadModels:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-08-18T20:04:31: PM2 log: pid=22556 msg=process killed
PM2 | 2020-08-18T20:04:31: PM2 log: App [uploadModels:0] starting in -fork mode-
PM2 | 2020-08-18T20:04:31: PM2 log: App [uploadModels:0] online
PM2 | 2020-08-18T20:04:36: PM2 log: [Watch] Stop watching uploadModels
PM2 | 2020-08-18T20:04:36: PM2 log: Stopping app:uploadModels id:0
PM2 | 2020-08-18T20:04:37: PM2 log: App [uploadModels:0] exited with code [1] via signal [SIGINT]
PM2 | 2020-08-18T20:04:37: PM2 log: pid=12156 msg=process killed



Please copy/paste the above report in your issue on https://github.com/Unitech/pm2/issues

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are named. Start by reviewing the linked issue and reproducing the failure with PM2 4.4.1, Node.js 14.8.0, and an ESM script on Windows 10; done means the script runs through PM2 without the reported failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.