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

Not working with Bun #59

Closed
Commandcracker opened this issue Oct 23, 2023 · 1 comment
Closed

Not working with Bun #59

Commandcracker opened this issue Oct 23, 2023 · 1 comment

Comments

@Commandcracker
Copy link

$ bun index.js
45 |    const returnValue = {};
46 | 
47 |    await Promise.all(['comm', 'args', 'ppid', 'uid', '%cpu', '%mem'].map(async cmd => {
48 |            const {stdout} = await execFile('ps', [flags, `pid,${cmd}`], {maxBuffer: TEN_MEGABYTES});
49 | 
50 |            for (let line of stdout.trim().split('\n').slice(1)) {
                       ^
TypeError: undefined is not an object (evaluating 'stdout.trim')
      at ***/node_modules/ps-list/index.js:50:19
      at processTicksAndRejections (:61:76)

const {stdout} = await execFile('ps', [flags, `pid,${cmd}`], {maxBuffer: TEN_MEGABYTES});

Changing const {stdout} = to const stdout = fix it for me.

@sindresorhus
Copy link
Owner

Bun compatibility issues should be opened on the Bun issue tracker.

@sindresorhus sindresorhus closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
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

2 participants