Open Jswk1 opened 5 years ago
Even the pm2-logrotate
still uses the deprecated Pmx
module where it works correctly and it also works correctly in my case.
From my brief debugging I was able to find out that the config is loaded correctly in the Pmx.init
method but not Pmx.initModule
. The config is loaded in Configuration.init
and sent to PM2
but the module process is never refreshed with these settings for some reason.
Configuration.findPackageJson
returns wrong path to package.json
file. It tries to resolve a path based on require.main.filename
and it contains path to ProcessContainerFork.js
file and as a result @pm2/io
parses package.json
file of pm2
package instead of a module one.
Is there any update on this issue?
I think most if not all of the modules [listed on the website}(https://pm2.io/docs/plus/guide/modules/) still use the deprecated pmx
library because of this issue.
Hello. I'm having problems with module development using latest
@pm2/io
version4.2.6
. Previously I've been using the deprecatedPmx
modulehttps://github.com/keymetrics/pmx
and it worked correctly with the same code.This is my startup code for module:
The config object in
Pmx.initModule
callback is some default configuration and it doesn't contain my settings neither frompackage.json
normodule_conf.json
file:I have the
config
section in mypackage.json
of my module package and the same config inmodule_conf.json
file in the section of my module name.Is there anything else that should be done to load configuration?