Unitech / Unitech/pm2

pm2 Not Supported Optional Chaining

Open
#5,010 5 comments 5 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?

When I run code using node and nodemon there's no problem using "Optional Chaining".
But when I run code using pm2 there's an error showing "Unexpected Token '.'" from "result?.code".

How could we reproduce this issue?

Use an Optional Chaining Operator then run it on pm2.

Supporting information

$ pm2 report

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

The issue names no files or tests. Reproduce the failure by running a PM2-managed application containing optional chaining such as result?.code, compare it with nodemon, and inspect PM2's startup or runtime handling. Done means the same application runs under PM2 without the Unexpected Token '.' error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.