-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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]: TypeError (undefined global) when using setup()
with vue3-vite
#25400
Comments
I found some other issues with the same error:
|
I think the error originates from |
@ndelangen something is wrong with |
@shilman |
This comment was marked as off-topic.
This comment was marked as off-topic.
Heres my comment about what I encountered for reference. Though I'm not sure its the same thing. My issue seems to come from the cjs bundling generating a dynamic require function in addon-actions. Looks like the cjs bundling is targetting node and so that might explain why it behaves differently. In the issue here it looks like something in storybook vue maybe? though if you can resolve mjs instead maybe that fixes your issue. |
@bodograumann I checked back to version 7.0.n and all exhibit the same error, so I suspect this is a downstream issue |
Thanks @MacroMan . I have hidden my comment as off-topic and will try to create a separate reproduction. |
Is there any workaround that will let me add to the Vue instance without |
@ndelangen by any chance is this fixed already since you changed the bundle target for tsup? |
I'm looking at the repro, and AFAIK it makes not sense to be calling this in import { setup } from "@storybook/vue3"
setup((app) => {
// app.use(Plugin);
}); Should this code be located inside of I upgraded the repro and moved the code as described above and storybook started, no problem. |
Describe the bug
When using
setup()
from@storybook/vue3
in.storybook/main.ts
:the following error is thrown:
To Reproduce
https://stackblitz.com/edit/github-2zq7kx?file=.storybook%2Fmain.ts
System
Additional context
Tested and have same error with storybook
7.6.4
,7.6.7
and8.0.0-alpha.6
The text was updated successfully, but these errors were encountered: