Open SaiChand-Headout opened 2 months ago
@dannyhw i've seen a similar issue in storybook JS repo as well, but didn't see any resolution over there. Felt this is the right repo to track hence sharing here. https://github.com/storybookjs/react-native/issues/598 for reference
please can you share the version of react-native and storybook etc
I've shared it in the description, storybook version (7.6.20) and RN version (0.70.5) here are the versions i've used
Can you try updating react native or is that not an option?
But also can you verify that all storybook packages are on the same version?
Unfortunately no, we have an update scheduled by the end of year, we can do it only then
what about the versions of the different storybook packages are they all aligned?
Yes, they are all same
Sorry to bother you, any updates here ?
do you have a reproduction I can look at?
unfortunately, it's a private repo.. but you can try it out with https://github.com/esbenvb/storybook-rn-minify-issue this link, they were facing the same issue and the dependency versions are pretty much similar...
A reproduction is a minimal recreation of the problem in a public repo it doesn't require private code to be included.
I don't have a lot of time to look at it right now because of work and other commitments but i will try to check this weekend
Sure @dannyhw , any luck with this ??
so far I have just confirmed that by passing --minify false
it does work, so the minify step is causing the issue. Still trying out different options to try and figure out what the issue is.
@SaiChand-Headout Ok I found the issue, there is a ??=
that seems to cause the issue, if you add '@babel/plugin-transform-logical-assignment-operators' then it successfully minifies.
heres the changes needed: https://github.com/esbenvb/storybook-rn-minify-issue/pull/1/files
I had the same issue with react native 0.69.9, spent days trying to get storybook working on android.
@dannyhw's solution works perfectly. Thanks guys!
thanks a lot @dannyhw , this worked
error: Error: Unable to resolve module url from /Users/xxxxxx/node_modules/axios/dist/node/axios.cjs: url could not be found within the project or in these directories: -> 8.3.5 , A lot of bugs don't need to be pushed back to 7.6.20 for a while
@hanwenbo if you have a specific error please create a new issue describing the problem
Describe the bug error node_modules/@storybook/preview-api/dist/preview-web.js: Unexpected token: operator (?) in file node_modules/@storybook/preview-api/dist/preview-web.js at 3139:39. Getting this error when trying to build for iOS
To Reproduce Steps to reproduce the behavior: Run yarn ./node_modules/.bin/react-native bundle \ --dev false \ --platform ios \ --reset-cache \ --entry-file index.js \ --bundle-output ./TEST_BUNDLE \ --sourcemap-output ./TEST_BUNDLE.map in root folder with storybook version (7.6.20) and RN version (0.70.5)
Screenshots