我已经使用 nexe 在 linux 上创建了一个 nodejs 可执行文件。我已将 module_conf.json 文件设置为以下配置 -
{
"apps" : [{
"name" : "nodeapp",
"script" : "./app",
"exec_interpreter": "none",
"exec_mode" : "fork_mode"
}]
}
我用pm2 start ./app
,但它不起作用。当我看到 pm2 日志时,我收到以下错误 -
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:120:11)
at Object.resolve (path.js:980:7)
at resolveMainPath (internal/modules/run_main.js:12:40)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:65:24)
at internal/main/run_main_module.js:17:47 {
code: 'ERR_INVALID_ARG_TYPE'
}