Skip to content

process.chdir() is not supported in workers (--no-threads doesn't work) #1436

@cyco130

Description

@cyco130

Describe the bug

When I try to call process.chdir in a test, I get "TypeError: process.chdir() is not supported in workers". From #566 I understand the solution is passing --no-threads but it doesn't seem to work.

Reproduction

https://stackblitz.com/edit/node-ve8ywd?file=package.json

System Info

System:
  OS: Linux 5.4 Linux Mint 20.3 (Una)
  CPU: (8) x64 Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz
  Memory: 3.70 GB / 15.52 GB
  Container: Yes
  Shell: 5.0.17 - /bin/bash
Binaries:
  Node: 18.2.0 - /usr/local/bin/node
  Yarn: 1.22.11 - ~/.npm-global/bin/yarn
  npm: 8.5.1 - ~/.npm-global/bin/npm
Browsers:
  Chrome: 102.0.5005.61
  Firefox: 101.0
npmPackages:
  vitest: ^0.13.1 => 0.13.1

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions