babel-node not working when launching with ecosystem.config.js
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?
babel-node doesn't transpile properly when launching app with a config.js file. Using CLI arguments works, ex: pm2 start --interpreter babel-node app.js.
When launching from the config.js file, what's weird is that when I run pm2 info app it says that the interpreter is babel-node, however I still get errors on my ES6 syntax. When launching with CLI arguments, it appears everything is transpiling correctly and no errors are logged.
How could we reproduce this issue?
The config file I use is:
apps : [{
name: 'app',
script: 'app.js',
watch: '.',
interpreter: '/usr/bin/babel-node',
exec_mode: 'fork'
}]
};
The CLI command that works as expected is pm2 start --interpreter babel-node app.js
Supporting information
$ pm2 report
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
Reproduce the discrepancy using the supplied ecosystem.config.js and compare it with pm2 start --interpreter babel-node app.js. Start by tracing how the config-file interpreter value is handled versus the CLI value, then verify that an ES6 app launches without syntax errors in both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100