calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
31.65k stars 7.7k forks source link

Storybook - broken Booker page #8913

Open a0m0rajab opened 1 year ago

a0m0rajab commented 1 year ago

Found a bug? Please fill out the sections below. 👍

Issue Summary

when visiting booker it gives an error.

The link: https://ui-rkjl4n59r-cal.vercel.app/?path=/story/atoms-booker--booker&globals=outline:true

Steps to Reproduce

  1. open storybook
  2. go to booker
  3. get the issue
deepak-likes-code commented 1 year ago

Can you please assign this issue to me? Thanks : )

deepak-likes-code commented 1 year ago

Hey @a0m0rajab. I'm not able to reproduce the above bug on my local as the Atoms field isn't showing up running yarn dev from apps/storybook folder.

Here is a picture for your reference

Screenshot 2023-05-18 at 3 36 26 PM
a0m0rajab commented 1 year ago

You need to open the atoms booker: image but it's not visible on your side.

Here is a screenshot for reference: image

ysfBenali commented 1 year ago

Hello !

@deepak-likes-code, The Booker component relies on the os module, which is not available in the browser environment by default. The webpackFinal configuration for os is set to false in .storybook/main.js, disabling browser compatibility entirely.

That's why Booker.stories.mdx can't render properly ( Not Visible ) .

@PeerRich Disabling all of the Node.js core modules may cause the same issue with other stories, Is there a plan to fix it later?

@a0m0rajab Regarding the useContext error you're facing, it is likely related to TRPC. It appears that the TrpcProvider is missing.

a0m0rajab commented 1 year ago

thanks @ysfBenali should not it be provided since I am using the default hosted page?