pm2 doesn't recognize script when ommiting .js
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
When starting a Node.js application with the vanilla node command, you can omit the .js file extension and it still runs fine: node index.js can be simplified to node index. However, pm2 start node index.js cannot be simplified to pm2 start node index; it will return a "Script not found" error. It would be really nice to see this shorthand included in pm2!
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
Start by tracing the pm2 start command's argument parsing and script lookup, then reproduce the difference between pm2 start node index.js and pm2 start node index. Done means the extensionless form starts the Node.js script while the existing explicit .js form continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100