Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow any name for javascript ecosystem file. #4652

Closed
AoDev opened this issue Mar 30, 2020 · 4 comments
Closed

Allow any name for javascript ecosystem file. #4652

AoDev opened this issue Mar 30, 2020 · 4 comments
Labels

Comments

@AoDev
Copy link

AoDev commented Mar 30, 2020

What's going wrong?

Context: I have a lot of troubles having pm2 work within a ES6 written codebase (import). (experimental module flag, type: "module" in package.json, etc. I know there are other issues about it.

I'd like: to be able to use the .cjs extension for ecosystem.config.cjs
But it seems that the file is not found and it defaults to package.json where I have no config for pm2.

That said: per the docs:

Note that using a Javascript configuration file requires to end the file name with .config.js

Not too sure why we can not use any name we want, but if this is hard coded, I guess that's the reason it's not working.

Can we do something about it please?

PS: pm2 is awesome ;)

@Timic3
Copy link
Contributor

Timic3 commented Apr 12, 2020

Check out #4662. If you need it before (or if?) it gets merged, use: npm install git://github.com/Timic3/pm2.git#fix/common-module-import -g

@AoDev
Copy link
Author

AoDev commented Apr 13, 2020

@Timic3 Awesome. Thanks : )

@Timic3
Copy link
Contributor

Timic3 commented Apr 17, 2020

The pull request has been merged into development branch, so you can now install it with npm install git://github.com/Unitech/pm2.git#development -g. This issue can now be closed. :)

@stale
Copy link

stale bot commented May 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 23, 2020
@stale stale bot closed this as completed Jun 6, 2020
karol-bujacek added a commit to karol-bujacek/pm2 that referenced this issue Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants