Unitech / Unitech/pm2

ProcessContainerFork not found win10 + ubuntu

Open
#3,130 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S: Open for PR SYS: Windows T: Bug
Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

Getting the following error when running

pm2 start debug.js

A simple webserver (total.js)

module.js:471
0|debug    |     throw err;
0|debug    |     ^
0|debug    |
0|debug    | Error: Cannot find module 'C:\work\simoleon\www\ProcessContainerFork.js'
0|debug    |     at Function.Module._resolveFilename (module.js:469:15)
0|debug    |     at Function.Module._load (module.js:417:25)
0|debug    |     at Module.runMain (module.js:604:10)
0|debug    |     at run (bootstrap_node.js:389:7)
0|debug    |     at startup (bootstrap_node.js:149:9)
0|debug    |     at bootstrap_node.js:504:3

ProcessContainerFork.js is not generated within that folder - I can replicate the issue on windows 10 locally and on ubuntu server

How could we reproduce this issue?

I did the following -
npm install -g pm2
npm install -g total.js
copy basic totaljs site/scripts across
pm2 start debug.js

Supporting information

Please run the following command (available on PM2 >= 2.6)

$ pm2 report

===============================================================================
--- PM2 REPORT (Sat Sep 02 2017 23:01:50 GMT+0100 (GMT Summer Time)) ----------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 2.6.1
node version         : 6.11.2
node path            : undefined
argv                 : C:\Program Files\nodejs\node.exe,C:\Users\johns\AppData\Roaming\nvm\v6.11.2\node_modules\pm2\lib\Daemon.js
argv0                : node
user                 : undefined
uid                  : N/A
gid                  : N/A
uptime               : 13min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 2.6.1
node version         : 6.11.2
node path            : undefined
argv                 : C:\Program Files\nodejs\node.exe,C:\Program Files\nodejs\node_modules\pm2\bin\pm2,report
argv0                : C:\Program Files\nodejs\\node.exe
user                 : undefined
C:\Users\johns\AppData\Roaming\nvm\v6.11.2\node_modules\pm2\lib\API\Extra.js:70
        fmt.field('uid', process.geteuid());
                                 ^

TypeError: process.geteuid is not a function
    at C:\Users\johns\AppData\Roaming\nvm\v6.11.2\node_modules\pm2\lib\API\Extra.js:70:34
    at C:\Users\johns\AppData\Roaming\nvm\v6.11.2\node_modules\pm2\node_modules\pm2-axon-rpc\lib\client.js:45:10
    at Parser.<anonymous> (C:\Users\johns\AppData\Roaming\nvm\v6.11.2\node_modules\pm2\node_modules\pm2-axon\lib\sockets\req.js:67:8)
    at emitOne (events.js:96:13)
    at Parser.emit (events.js:188:7)
    at Parser._write (C:\Users\johns\AppData\Roaming\nvm\v6.11.2\node_modules\pm2\node_modules\amp\lib\stream.js:91:16)
    at doWrite (_stream_writable.js:331:12)
    at writeOrBuffer (_stream_writable.js:317:5)
    at Parser.Writable.write (_stream_writable.js:243:11)
    at Socket.ondata (_stream_readable.js:555:20)
===============================================================================
--- PM2 REPORT (Sat Sep 02 2017 22:07:30 GMT+0000 (UTC)) ----------------------
===============================================================================
--- Daemon -------------------------------------------------
pm2d version         : 2.6.1
node version         : 8.4.0
node path            : /usr/bin/pm2
argv                 : /usr/bin/nodejs,/usr/lib/node_modules/pm2/lib/Daemon.js
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
uptime               : 1399min
===============================================================================
--- CLI ----------------------------------------------------
local pm2            : 2.6.1
node version         : 8.4.0
node path            : /usr/bin/pm2
argv                 : /usr/bin/nodejs,/usr/bin/pm2,report
argv0                : node
user                 : root
uid                  : 0
gid                  : 0
===============================================================================
--- System info --------------------------------------------
arch                 : x64
platform             : linux
type                 : Linux
cpus                 : Intel(R) Xeon(R) CPU @ 2.30GHz
cpus nb              : 1
freemem              : 398073856
totalmem             : 1776336896
home                 : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌──────────┬────┬──────┬─────┬─────────┬─────────┬────────┬─────┬────────┬──────┬──────────┐
│ App name │ id │ mode │ pid │ status  │ restart │ uptime │ cpu │ mem    │ user │ watching │
├──────────┼────┼──────┼─────┼─────────┼─────────┼────────┼─────┼────────┼──────┼──────────┤
│ debug    │ 0  │ fork │ 0   │ errored │ 15      │ 0      │ 0%  │ 0 B    │ root │ disabled │
└──────────┴────┴──────┴─────┴─────────┴─────────┴────────┴─────┴────────┴──────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
┌──────────┬────┬──────┬─────┬─────────┬─────────┬────────┬─────┬────────┬──────┬──────────┐
│ App name │ id │ mode │ pid │ status  │ restart │ uptime │ cpu │ mem    │ user │ watching │
├──────────┼────┼──────┼─────┼─────────┼─────────┼────────┼─────┼────────┼──────┼──────────┤
│ debug    │ 0  │ fork │ 0   │ errored │ 15      │ 0      │ 0%  │ 0 B    │ root │ disabled │
└──────────┴────┴──────┴─────┴─────────┴─────────┴────────┴─────┴────────┴──────┴──────────┘

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

Reproduce the failure with npm install -g pm2, npm install -g total.js, and pm2 start debug.js on Windows 10 and Ubuntu. Start by tracing why ProcessContainerFork.js is resolved from the application directory, and use the pm2 report output and the referenced lib/API/Extra.js path for additional platform-specific context. Done means fork mode starts successfully without the missing-module error on both platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.