-
Notifications
You must be signed in to change notification settings - Fork 107
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
Clean install is weirdly borked #232
Comments
I think this happens when two incompatible versions of acorn are used. I'll see if I can reproduce |
Here's a repo with the reproduction up to the first |
I am getting this on a clean install - bit of a blocker :/ |
OK, thanks for the reproduction @JamesYeoman. I've figured out what's happening. If The temporary solution is to add |
Oh, and you'll probably also hit storybookjs/storybook#17516 next. I've got a PR up in storybook to fix it, but for now you can remove |
Fixes #232 This tweaks the way we do our `optimizeDeps.include` slightly, allowing us to add `'@storybook/addon-docs > acorn-jsx'`. I needed to change our `filter` function to use the resolution that vite does (see https://github.com/vitejs/vite/blob/67d164392e8e9081dc3f0338c4b4b8eea6c5f7da/packages/vite/src/node/optimizer/index.ts#L182-L199), but in the end I think this is more reliable than what we were doing before, anyway. With this syntax in place, we might also be able to avoid optimizing the storybook deps themselves, like `@storybook/addon-docs`, which already has an ESM export and doesn't really need to be pre-bundled at all, only its sub-dependencies do. I haven't changed anything like that in this PR, though, since I wanted to take it one-step-at-a-time. The only change made to the list itself is the addition of `'@storybook/addon-docs > acorn-jsx'`. I also needed to prevent the vue alias from being added unless vue is actually being used, or else vite threw an error when I tried to resolve the config.
So I used
npx sb@next repro
, and it all works fine. But as I've commented in the following code block, a clean vite + sb-builder-vite install errors outHere's a screenshot of the "acorn jsx error"

This error seems to make everything load infinitely. No error gets displayed in my shell, and everything comes to a standstill.
The text was updated successfully, but these errors were encountered: