-
Notifications
You must be signed in to change notification settings - Fork 106
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] Cannot start storybook with newly generated project #441
Comments
Thanks, Vite 3 is adding |
Here's a PR to fix the underyling issue: storybookjs/storybook#18714. |
Hey @IanVS You don't happen to know if that fix has been released or when it's going to be released ? Thanks, |
I'm not sure. @shilman do you have any kind of timeline for releasing 6.5.10? |
Even renaming the file to |
@patoncrispy thanks I'll fix that soon too. In the meantime, you can install it manually if you'd like. |
Or, if you'd like to submit a PR that adds it as a dependency to this project, feel free. Otherwise, I'll try to take care of it tomorrow or the next day. |
Closed by storybookjs/storybook#18714 and #459, just waiting for releases. |
Has this fix been released ? I've updated the storybook package but I'm still running into the same issue as before |
The fix is for new projects. You can fix the issue in existing projects by changing the extension of main.js to main.cjs. |
Hmm strange, I just generated a new project and I'm still getting the error (See screenshot below) Even when I update the main.js to main.cjs I get the error (See sreenshot below) FYI this is with a brand new project just installed, I've setup a react and vite project and re-ran the initialiation for storybook. |
I think you're using an unsupported version of node. Are you able to use the latest 16 or 18 version? |
Bit of a weird issue this. So I had node v17.4.0 so I installed the latest version of node which is 18.8.0 currently, however, the issue was still present. So I downgraded to the LTS version which is currently 16.16.0 and weirdly fixed this issue I can successfully load storybook. Wonder why it didn't work with the latest version, it's a little concerning as Storybook could break in a future version of nodejs. |
Thanks for reporting back. It's being addressed in the upcoming 7.0 version of storybook. The error is coming from webpack 4, which storybook will no longer use. |
Seems to be all working now. Weird how you need to change main.js to main.cjs. |
Glad it's working.
That is the way that node works. If you have |
How exactly does this fix work for typescript projects? |
@RodrigoNovais, for now, I'd recommend against trying to use typescript for your storybook config files ( But, other files like components and stories can still use typescript just fine. It's only the storybook config files that aren't great. |
I am sorry, that's not what I meant. |
@RodrigoNovais mind opening a new issue describing the problem you're seeing? |
@IanVS I'll be doing that as soon as I can |
What version of
vite
are you using?3.0.0
System info and storybook versions
Describe the Bug
vue-ts
for Vite)Link to Minimal Reproducible Example
https://github.com/ahnpnl/vite-sb-ts
Participation
The text was updated successfully, but these errors were encountered: