'Cannot set properties of undefined' for enum in production with Vite and Typescript #30296
Unanswered
MattElcock
asked this question in
Help
Replies: 1 comment
-
I've installed madge to try and identify circular dependencies, as I saw here that might be an issue. There were no circular dependencies in our project. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hello,
I am migrating my team's project to use Vite. After adding Vite, Storybook boots up absolutely fine in development. It also compiles successfully.
However, when I run the production version of Storybook and look through the stories, some error with this:
Additional information
The error originates from the minified version of a
types.ts
file. Here is the part of the file it errors on:Removing the enum simply moves the error to the next enum that it finds.
Context
Package Versions
.storybook/main.ts
vite.config.ts
tsconfig.json
tsconfig.app.json
tsconfig.node.json
Create a reproduction
Unfortunately, I am unable to share a link to clone our repository as our product is not open source. But, if needed, please let me know and I can attempt to recreate the issue in a new, seperate project.
Beta Was this translation helpful? Give feedback.
All reactions