pm2
pm2 copied to clipboard
TypeError: _env[key].slice is not a function when running `pm2 info`
What's going wrong?
How could we reproduce this issue?
Divergent env variables from local env
/home/ubuntu/.nvm/versions/node/v16.14.0/lib/node_modules/pm2/lib/API/UX/pm2-describe.js:179
obj[key] = _env[key].slice(0, process.stdout.columns - 60)
^
TypeError: _env[key].slice is not a function
at /home/ubuntu/.nvm/versions/node/v16.14.0/lib/node_modules/pm2/lib/API/UX/pm2-describe.js:179:28
at Array.forEach (<anonymous>)
at module.exports [as describe] (/home/ubuntu/.nvm/versions/node/v16.14.0/lib/node_modules/pm2/lib/API/UX/pm2-describe.js:176:25)
at /home/ubuntu/.nvm/versions/node/v16.14.0/lib/node_modules/pm2/lib/API.js:1881:14
at Array.forEach (<anonymous>)
Running cmd pm2 info app-name in Go.
var sh string = fmt.Sprintf("pm2 info %q", "some-app")
cmd := exec.Command("bash", "-c", sh)