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

[Bug]: Warning is shown: The CJS build of Vite's Node API is deprecated #24333

Closed
IanVS opened this issue Sep 29, 2023 · 2 comments · Fixed by #24395
Closed

[Bug]: Warning is shown: The CJS build of Vite's Node API is deprecated #24333

IanVS opened this issue Sep 29, 2023 · 2 comments · Fixed by #24395

Comments

@IanVS
Copy link
Member

IanVS commented Sep 29, 2023

Describe the bug

With the latest Vite 5 beta (beta.3), we are getting a warning logged to the terminal when starting up storybook:

The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

I guess they're going to force us to start using their ESM build, and we should probably do it sooner than later, to avoid users reporting this warning.

To Reproduce

https://stackblitz.com/edit/github-wgldvd?file=package.json

System

N/A

Additional context

No response

@bentaly
Copy link

bentaly commented Dec 15, 2023

Hi, out of curiosity, will this change be included in version 8? given it seems support for Vite 5 will be dealt with in that release?
#25115
If so is there a rough timescale?

Thanks

@IanVS
Copy link
Member Author

IanVS commented Dec 15, 2023

Vite 5 is fully supported in Storybook 7, though in some cases we are using the Vite CJS APIs. They continue to work just fine. We will be sure to remove usage of them in Storybook 8 so that when they are removed in Vite 6 or above, Storybook continues to work without a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants