-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
0.26.1 stops importing some packages #2544
Comments
|
Same with mkdirp: sync is not a function |
This is expected behaviour since 0.26.0.
We can probably improve the default handling, if you have any suggestions. The decisions was made to drop auto interop in Node because this code will not actually work with native node. |
I'm having similar issues with import {createAsyncThunk} from '@reduxjs/toolkit';
// and
import CredentialsProvider from 'next-auth/providers/credentials'; Vitest fails with:
I checked and both of those packages have the appropriate exports (from what I can tell). Rolling back to vitest 0.25.8 makes the problem go away. I'm not sure what |
https://vitest.dev/config/#deps-interopdefault Importing from
In source code you can see exactly why this doesn't work: All the code is on
Again, this changed is mentioned in release: https://github.com/vitest-dev/vitest/releases/tag/v0.26.0 If you are using non-node environment, Vitest assumes your bundler will fix this ESM issues. If you need to use |
I was having this issue with lodash and this import: import { get } from 'lodash' adding fixed it. Isn't it high time that lodash exports ESM modules @jdalton ? |
I think there is |
yes, |
A bit confusing though that according to the docs In fact, |
This is error in docs, it will be fixed.
It cannot be on |
Describe the bug
0.25.8 works well
import { read } from 'fs-jetpack'
Turns out to be empty when doing import destructuring.
import fs from 'fs-jetpack'
Works fine.
TypeError: read is not a function
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-gv9cw4
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: