:: Created by npm, please don't edit manually.
Open
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?
I'm following this details especially the Start and configure PM2 with a config.js file part but getting this error, anyone ran into this before?
C:\Users\<user>\AppData\Roaming\nvm\v16.15.0\NPM.CMD:1
:: Created by npm, please don't edit manually.
^
SyntaxError: Unexpected token ':'
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Object.<anonymous> (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
How could we reproduce this issue?
Please follow this link to reproduce the error.
Followed this post and also posted below but not reply as yet.
Supporting information
All the information is supplied below.
--- PM2 report ----------------------------------------------------------------
Date : Thu Mar 16 2023 23:39:51 GMT+0200 (South Africa Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.2.2
node version : 16.15.0
node path : not found
argv : C:\Program Files\nodejs\node.exe,C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\Daemon.js
argv0 : node
user : undefined
uid : N/A
gid : N/A
uptime : 96min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.2.2
node version : 16.15.0
node path : not found
argv : C:\Program Files\nodejs\node.exe,C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\bin\pm2,report
argv0 : C:\Program Files\nodejs\node.exe
user : <user>
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : win32
type : Windows_NT
cpus : Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
cpus nb : 4
freemem : 12363161600
totalmem : 17178693632
home : C:\Users\<user>
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼───────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ server │ default │ 0.1.0 │ fork │ 268824 │ 89m │ 0 │ online │ 0% │ 136.8mb │ mon… │ disabled │
└─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
C:\ProgramData\pm2\home\pm2.log last 20 lines:
PM2 | at God.deleteProcessId (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\God\ActionMethods.js:366:9)
PM2 | at Server.onmessage (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\node_modules\pm2-axon-rpc\lib\server.js:104:6)
PM2 | at RepSocket.emit (node:events:527:28)
PM2 | at RepSocket.emit (node:domain:475:12)
PM2 | at Parser.<anonymous> (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\node_modules\pm2-axon\lib\sockets\rep.js:51:15)
PM2 | at Parser.emit (node:events:527:28)
PM2 | at Parser.emit (node:domain:537:15)
PM2 | at Parser._write (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\node_modules\amp\lib\stream.js:91:16)
PM2 | at Object.God.logAndGenerateError (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\God\Methods.js:34:15)
PM2 | at C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\God\ActionMethods.js:367:30
PM2 | at Object.God.stopProcessId (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\God\ActionMethods.js:289:14)
PM2 | at God.deleteProcessId (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\lib\God\ActionMethods.js:366:9)
PM2 | at Server.onmessage (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\node_modules\pm2-axon-rpc\lib\server.js:104:6)
PM2 | at RepSocket.emit (node:events:527:28)
PM2 | at RepSocket.emit (node:domain:475:12)
PM2 | at Parser.<anonymous> (C:\Users\<user>\AppData\Roaming\npm\node_modules\pm2\node_modules\pm2-axon\lib\sockets\rep.js:51:15)
PM2 | at Parser.emit (node:events:527:28)
PM2 | at Parser.emit (node:domain:537:15)
PM2 | 2023-03-16T23:30:16: PM2 log: Stopping app:app id:3
PM2 | 2023-03-16T23:30:16: PM2 error: app=app id=3 does not have a pid
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read lib/ProcessContainerFork.js at line 33 and reproduce the problem using the linked Strapi deployment instructions, Windows, Node 16.15.0, and PM2 5.2.2. Trace why npm.cmd is loaded as JavaScript; done means the documented config.js deployment starts without the reported SyntaxError.
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
- 32/100