-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Describe the bug
Mocking filesystem with memfs as described here throws an error with version 3.
This is what I got using the example code:
Instead change the require of ...../node_modules/tslib/tslib.es6.mjs to a dynamic import() which is available in all CommonJS modules.
Error [ERR_REQUIRE_ESM]: require() of ES Module ...../node_modules/tslib/tslib.es6.mjs not supported.
Instead change the require of ...../node_modules/tslib/tslib.es6.mjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (...../node_modules/tree-dump/lib/index.js:3:17)
Reproduction
Vitest 3 with code from example
System Info
System:
OS: macOS 15.2
CPU: (12) arm64 Apple M2 Max
Memory: 1.36 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.0 - /usr/local/bin/node
npm: 10.9.0 - /usr/local/bin/npm
Browsers:
Chrome: 131.0.6778.265
Edge: 131.0.2903.147
Safari: 18.2
npmPackages:
@vitejs/plugin-react: ^4.3.2 => 4.3.4
@vitest/coverage-v8: ^3.0.0 => 3.0.0
vite: ^6.0.7 => 6.0.7
vitest: ^3.0.0 => 3.0.0Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable