File ecosystem.config.js malformated
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Using this simple config in my ecosystem.config.js :
module.exports = {
apps : [{
script: 'app.js',
watch: '.'
}]
};
I have the following error :
[PM2][ERROR] File ecosystem.config.js malformated
TypeError: Cannot convert undefined or null to object
at Common.parseConfig (/Users/louisbrulenaudet/.yarn/berry/cache/pm2-npm-5.3.0-910c0e1105-9.zip/node_modules/pm2/lib/Common.js:316:26)
at API._startJson (/Users/louisbrulenaudet/.yarn/berry/cache/pm2-npm-5.3.0-910c0e1105-9.zip/node_modules/pm2/lib/API.js:934:25)
at API.start (/Users/louisbrulenaudet/.yarn/berry/cache/pm2-npm-5.3.0-910c0e1105-9.zip/node_modules/pm2/lib/API.js:329:12)
at /Users/louisbrulenaudet/.yarn/berry/cache/pm2-npm-5.3.0-910c0e1105-9.zip/node_modules/pm2/lib/binaries/CLI.js:290:13
at /Users/louisbrulenaudet/.yarn/berry/cache/async-npm-3.2.4-aba13508f9-9.zip/node_modules/async/internal/withoutIndex.js:8:40
at replenish (/Users/louisbrulenaudet/.yarn/berry/cache/async-npm-3.2.4-aba13508f9-9.zip/node_modules/async/internal/eachOfLimit.js:81:17)
at /Users/louisbrulenaudet/.yarn/berry/cache/async-npm-3.2.4-aba13508f9-9.zip/node_modules/async/internal/eachOfLimit.js:86:9
at eachLimit (/Users/louisbrulenaudet/.yarn/berry/cache/async-npm-3.2.4-aba13508f9-9.zip/node_modules/async/forEachLimit.js:47:43)
at awaitable (/Users/louisbrulenaudet/.yarn/berry/cache/async-npm-3.2.4-aba13508f9-9.zip/node_modules/async/internal/awaitify.js:13:28)
at Command. (/Users/louisbrulenaudet/.yarn/berry/cache/pm2-npm-5.3.0-910c0e1105-9.zip/node_modules/pm2/lib/binaries/CLI.js:289:7)
I use Node 20.6.0 with Yarn berry.
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 with the failing configuration in ecosystem.config.js and the stack trace location in lib/Common.js:316, then trace how API.js and the CLI invoke config parsing. Reproduce the malformed-file error with the supplied Node 20 and Yarn Berry setup; done means this valid configuration is accepted without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100