gluestack

gluestack Logogluestack

Storybook with GluestackV2.

dornellesfr posted this in #support
Open in Discord
Avatar
dornellesfrOP
Hello there!
I've used this tutorial to implement the nativewind with storybook:
https://techblog.geekyants.com/setting-up-universal-storybook-with-nativewind-a-step-by-step-guide

and I'm still having problems, and I dont really know how to fix it.

on directory app/_layout.tsx :

the error on mobile app: unable to manually set color scheme without using dark mode;

on main.ts:

error: require.resolve is not a function;

the structure is the same as the tutorial, buuuut, I've installed the glue stack UI v2 to it and when I changed the stories to be envolved by context of gluestack the app web crash. So the error is:

The requested module '/node_modules/react-native-svg/lib/module/lib/extract/transform.js?v=26091008' does not provide an export named 'parse'
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.
SyntaxError: The requested module '/node_modules/react-native-svg/lib/module/lib/extract/transform.js?v=26091008' does not provide an export named 'parse

1 Reply