-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Android Bundling failed 3112ms Unable to resolve "@storybook/react-native" from ".storybook/index.tsx" #540
Comments
I deleted all files from |
can you show the versions of each storybook package that you have installed? |
I don't understand a question :( I didn't write(add) any code. By the way this project |
oh I see the example project, sorry I didn't read the post correctly. Let me double check that. |
@viter-sweatcon You just need to run |
I used command |
can you try the next branch |
I think I have the same problem but it's hard for me to have a reproducible example. Our app is a monorepo and we just did the migration from storybook 6 to storybook 7. My dependencies for my react-native storybook are "@storybook/addon-actions": "~7.6.17",
"@storybook/addon-ondevice-actions": "~7.6.15",
"@storybook/addon-ondevice-controls": "~7.6.15",
"@storybook/react": "~7.6.17",
"@storybook/react-native": "~7.6.15", After the migration our app on dev works well but when we want to build it we have the error
|
@scesbron what do you mean by "when we want to build it" what command are you using for that for example. |
The command is a bit complex because of our monorepo setting but basically it does the same thing as |
@scesbron do you have the storybook requires file generated? that seems to have been the problem for this issue originally. It's really hard to pinpoint an issue for you without more context on your problem though. |
@dannyhw yes the storybook file are generated. We finally solved our issue, our problem was linked to the fact that we are using storybook in a monorepo. We updated our metro config based on this doc https://github.com/storybookjs/react-native/blob/next/MIGRATION.md#metro-config With our setup the config was not correct we needed to keep some particularities to define the const root = path.resolve(__dirname, '../../');
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig(__dirname);
return {
projectRoot: root, |
please let me know if this needs to be re-opened but it seems like this was a metro config thing |
Describe the bug
I try to run story book from example project (from tag 6.5.8) but I get error for both android and web build (didn't try iOS)
To Reproduce
Steps to reproduce the behavior:
expo-example
by VScodeyarn
commandyarn web
oryarn android
Expected behavior
Storybook launched on android or in a browser
Actual result
I get error:
Android Bundling failed 27ms Unable to resolve "@storybook/react-native" from ".storybook/index.tsx"
same for web.
What I do wrong ?
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: