Cannot destructure property 'id' of 'r' as it is undefined #30482
Replies: 2 comments 2 replies
-
|
I ran into the exact same issue, my reproduction: https://github.com/DarthRainbows/nx-angular-vite-storybook-issue I traced this to https://github.com/storybookjs/storybook/blob/next/code/core/src/preview-api/modules/store/StoryStore.ts#L142 This leads to a standard which is nonsense. |
Beta Was this translation helpful? Give feedback.
-
|
I ran into this issue as well. My NX workspace is configured to use vite, but storybook doesn't seem to work well. My workaround was to use webpack for storybook instead of vite. Just for clarity, my application still compiles with vite, but storybook core is compiled with webpack. I did run into some sass/css issues with webpack (trying to include a global styling for angular material, etc) with the Repo is a monorepo setup with multiple angular apps and multiple libraries. @nx 21.6.6 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When i try to use vite with storybook on Nx then strange error appears
Cannot destructure property 'id' of 'r' as it is undefined.
Here is a stackblitz:
https://stackblitz.com/edit/vitejs-vite-7ps1ws9o?file=README.md
please run in console
nx run ui:storybook
See that when i change configuration to webpack it works fine - in
main.tsI set builder to:@storybook/builder-webpack5)Additional information
main.ts file in .storybook
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions