-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
yt.platform.match is not a function #657
Comments
@khawrk can you please be more specific? when did you get this error? whats the project? how can I reproduce it? |
Hi @dannyhw I'm running a project in a monorepo using React Native and Expo for mobile app and then Next.js and React and typescript for website. So the structure of the repo is as follows:
I installed Storybook in both directories using the command for each framework and Storybook we installed to website directory works perfectly fine. However, I followed the instructions in this blog: https://dev.to/dannyhw/how-to-swap-between-react-native-storybook-and-your-app-p3o for the mobile directory and after I ran From what I understand, it failed when hitting this index.js file which is located in The error occurs in both Ios Simulator and in my connected device And it also fails when hitting This is my current setup: In "metro.config.js"
in "app.config.js"
Entry.ts
in "index.tsx" (Our app entry point and this output constant from app.config.js before running Storybook"
in babel.config.js I've added plugin as instructed in this repo
Storybook.requires.ts
I also tried adding console.log to each of file in ./storybook but none displays anything. |
@khawrk would you be able to provide a reproduction? that would make helping you a lot easier. The things you shared from your project would not be enough to reproduce the problem as far as I can tell. the isMacLike function is failing because it seems like navigator.platform is defined for you but not navigator.platform.match
maybe you have some polyfill that is adding navigator to 'global' normally navigator wouldn't be defined in react native. perhaps in "@/app/polyfills" |
@dannyhw yeah we have polyfills.ts and we use TextEncoder there
Is this helpful? |
this doesn't look related, but again to really know what the problem I need a reproduction |
HI I was trying to run storybook with react native ios but whenever I set
if (process.env.EXPO_PUBLIC_STORYBOOK_ENABLED === "true") { AppEntryPoint = require("../.storybook").default }
I got yt.platform.match is not a function error
The text was updated successfully, but these errors were encountered: