You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IN 5.0 Beta 12 (in beta 11 i do not encounter this error)
Upon running storybook within my react component library using RJSF and MUI...
If I include the following line in my component
import{withTheme}from'@rjsf/core';
and npm run storybook
I get the following error
ERRORin./node_modules/@rjsf/core/dist/core.esm.js808:31Moduleparse failed: Unexpectedtoken(808:31)Youmayneedanappropriateloadertohandlethisfiletype,currentlynoloadersareconfiguredtoprocessthisfile.Seehttps://webpack.js.org/concepts#loaders |// We deprecated enumNames in v5. It's intentionally omitted from RSJFSchema type, so we need to cast here.|constschemaWithEnumNames=schema;>constenums=schema.enum??[true,false];|if(!schemaWithEnumNames.enumNames&&enums.length===2&&enums.every(v=>typeofv==="boolean")){|enumOptions=[{
Expected Behavior
Storybook should be able to compile the module and run without error
It seems like some part of your environment doesn't know how to handle that ES2020 feature, and your toolchain isn't transpiling your ESM dependencies to prevent that issue from happening. There's probably a cleaner configuration fix that you (or the Storybook maintainers) could apply, but I don't really know where to start there.
In #3304, we'd publish ES5-compatible code, which should be good enough to fix this for you, assuming RJSF is the only library not playing nice here.
Prerequisites
What theme are you using?
mui
Version
5..0.0-beta.12
Current Behavior
IN 5.0 Beta 12 (in beta 11 i do not encounter this error)
Upon running storybook within my react component library using RJSF and MUI...
If I include the following line in my component
and
npm run storybook
I get the following error
Expected Behavior
Storybook should be able to compile the module and run without error
Steps To Reproduce
Package.json
babel.config.json
storybook/main.js
Environment
Anything else?
Hopefully this gives enough info, if more is needed I can provide
The text was updated successfully, but these errors were encountered: