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

TypeError: _env[key].slice is not a function when running pm2 info #5832

Open
fritx opened this issue May 30, 2024 · 0 comments
Open

TypeError: _env[key].slice is not a function when running pm2 info #5832

fritx opened this issue May 30, 2024 · 0 comments

Comments

@fritx
Copy link
Contributor

fritx commented May 30, 2024

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>)
image

Running cmd pm2 info app-name in Go.

var sh string = fmt.Sprintf("pm2 info %q", "some-app")
cmd := exec.Command("bash", "-c", sh)
fritx added a commit to we-fork/pm2 that referenced this issue May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant