Pm2: PM2 error: Error: spawn node ENOENT

Created on 7 May 2018  Β·  2Comments  Β·  Source: Unitech/pm2

Your issue may already be reported!
Please search on the issue tracker before creating one.

What's going wrong?

When I start up using following command, there are some errors in pm2.log :
pm2 start process.json
=====errors in pm2.log===============
[2018-05-07 16:21:11] PM2 error: Error: spawn node ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)

How could we reproduce this issue?

Supporting information

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

--- PM2 REPORT (Mon May 07 2018 16:40:27 GMT+0800 (中国标准既间)) -------------------

--- Daemon -------------------------------------------------
pm2d version : 2.10.3
node version : 6.11.0
node path : undefined
argv : C:\Program Filesnodejsnode.exe,C:\Usersx1\AppData\Roamingnpmnode_modules\pm2\lib\Daemon.js
argv0 : node
user : undefined
uid : N/A
gid : N/A

uptime : 5min

--- CLI ----------------------------------------------------
local pm2 : 2.10.3
node version : 6.11.0
node path : undefined
argv : C:\Program Filesnodejsnode.exe,C:\Usersx1\AppData\Roamingnpmnode_modules\pm2\bin\pm2,report
argv0 : node

user : x1

--- System info --------------------------------------------
arch : x64
platform : win32
type : Windows_NT
cpus : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
cpus nb : 4
freemem : 3017281536
totalmem : 8419135488

home : C:\Usersx1

--- PM2 list -----------------------------------------------
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ App name β”‚ id β”‚ mode β”‚ pid β”‚ status β”‚ restart β”‚ uptime β”‚ cpu β”‚ mem β”‚ user β”‚ watching β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ zhaogong β”‚ 0 β”‚ fork β”‚ N/A β”‚ errored β”‚ 0 β”‚ 0 β”‚ 0% β”‚ 0 B β”‚ x1 β”‚ enabled β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

--- Daemon logs --------------------------------------------
C:\Usersx1.pm2\pm2.log last 20 lines:
PM2 | [2018-05-07 16:34:46] PM2 log: Node.js version : 6.11.0
PM2 | [2018-05-07 16:34:46] PM2 log: Current arch : x64
PM2 | [2018-05-07 16:34:46] PM2 log: PM2 home : C:\Usersx1.pm2
PM2 | [2018-05-07 16:34:46] PM2 log: PM2 PID file : C:\Usersx1.pm2\pm2.pid
PM2 | [2018-05-07 16:34:46] PM2 log: RPC socket file : \.\pipe\rpc.sock
PM2 | [2018-05-07 16:34:46] PM2 log: BUS socket file : \.\pipe\pub.sock
PM2 | [2018-05-07 16:34:46] PM2 log: Application log path : C:\Usersx1.pm2\logs
PM2 | [2018-05-07 16:34:46] PM2 log: Process dump file : C:\Usersx1.pm2\dump.pm2
PM2 | [2018-05-07 16:34:46] PM2 log: Concurrent actions : 2
PM2 | [2018-05-07 16:34:46] PM2 log: SIGTERM timeout : 1600
PM2 | [2018-05-07 16:34:46] PM2 log: ===============================================================================
PM2 | [2018-05-07 16:34:46] PM2 log: [Watch] Start watching zhaogong
PM2 | [2018-05-07 16:34:46] PM2 log: Starting execution sequence in -fork mode- for app name:zhaogong id:0
PM2 | [2018-05-07 16:34:46] PM2 log: App name:zhaogong id:0 online
PM2 | [2018-05-07 16:34:46] PM2 error: Error: spawn node ENOENT
PM2 | at exports._errnoException (util.js:1018:11)
PM2 | at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
PM2 | at onErrorNT (internal/child_process.js:367:16)
PM2 | at _combinedTickCallback (internal/process/next_tick.js:80:11)
PM2 | at process._tickDomainCallback (internal/process/next_tick.js:128:9)

$ pm2 report

Most helpful comment

Solved after I changed the path in the process.json from "cwd": "/root/dev/zhaogong-be" to "cwd": "d:/zhaogong-be".

All 2 comments

how did you installed nodejs?

Solved after I changed the path in the process.json from "cwd": "/root/dev/zhaogong-be" to "cwd": "d:/zhaogong-be".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

waygee picture waygee  Β·  4Comments

webchaz picture webchaz  Β·  3Comments

ldarren picture ldarren  Β·  3Comments

alexpts picture alexpts  Β·  3Comments

lefam picture lefam  Β·  3Comments