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

child_process is empty with jsdom and production mode #4350

Closed
Aslemammad opened this issue Oct 22, 2023 · 2 comments
Closed

child_process is empty with jsdom and production mode #4350

Aslemammad opened this issue Oct 22, 2023 · 2 comments
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@Aslemammad
Copy link
Member

Describe the bug

pmndrs/valtio#801 (comment)

When the env is jsdom and the mode is production (or NODE_ENV is production), the child_process package is empty. This happens in v0.34.6 but not in v0.33.0.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-uyuvnz?file=test%2Fbasic.test.ts,package-lock.json,vite.config.ts,package.json&initialPath=__vitest__/

System Info

System:
    OS: macOS 13.4.1
    CPU: (8) arm64 Apple M2
    Memory: 54.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin
/node
    Yarn: 1.22.19 - ~/.local/share/pnpm/yarn
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/np
m
    pnpm: 8.7.6 - ~/.local/share/pnpm/pnpm
  Browsers:
    Brave Browser: 118.1.59.117
    Chrome: 118.0.5993.88
    Safari: 16.5.2
  npmPackages:
    @vitest/coverage-v8: ^0.34.6 => 0.34.6 
    @vitest/ui: ^0.34.6 => 0.34.6 
    vite: ^4.5.0 => 4.5.0 
    vitest: ^0.34.6 => 0.34.6 


### Used Package Manager

npm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide/).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@stackblitz
Copy link

stackblitz bot commented Oct 22, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@Aslemammad Aslemammad added the bug label Oct 23, 2023
@sheremet-va sheremet-va added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Oct 25, 2023
@sheremet-va
Copy link
Member

Looks like this issue was resolved already.

@sheremet-va sheremet-va removed the bug label Feb 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants