-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
The CJS build of Vite's Node API is deprecated #350
Comments
Is it just a warning, or an error? How can I reproduce it? |
It's just a warning. I assume you need to install the latest version of vitest and add some basic |
Thanks, gotcha. The first thing that caught my eye is that you probably want to set However, that won't be sufficient today, I think there's an issue in jiti. Knip uses jiti under the hood to load such config files. Hacked around a bit and didn't get it to work (not even when using the To get rid of the warning today, you could switch to use the
Knip should not clear or overwrite that output (e.g. it does not do that on my macOS with Bash). Can I ask which shell you are using? You can use |
I use zsh on my macOS. I can see the warning gets shown for a split second. With |
I have the same issue with '--no-progress' flag provided. In package.json set "type": "module". |
@yekver Those are two different things. The real issue here is about CJS vs ESM (with The other thing is only about how Knip logs things to |
FWIW I see the CJS notice in JoshuaKGoldberg/create-typescript-app#1082.
|
Yeah, it's coming from jiti, waiting for them to go fully ESM :) |
See #565 |
Started getting this error every time I run knip:
I use:
The text was updated successfully, but these errors were encountered: