Storybook: rc30: <Props /> render as "nothing found".

Created on 10 Aug 2020  ·  12Comments  ·  Source: storybookjs/storybook

Describe the bug
I updated from rc20 to rc30 this morning and all of my <Props /> show up as "nothing found".
(This is a Lerna monorepo)

import { Props } from '@storybook/addon-docs/blocks';
import Card from 'path/to/Card';

## Props
<Props of={Card} />

I also tried

import { ArgsTable } from '@storybook/addon-docs/blocks';
import Card from 'path/to/Card';

## Props
<ArgsTable />
<ArgsTable of='.' />

and got the same "Nothing found" result.

System:

$ npx -p @storybook/cli@next sb info

Environment Info:
(node:30336) UnhandledPromiseRejectionWarning: TypeError: (e || []).filter is not a function
    at /Users/n0271009/.npm/_npx/30223/lib/node_modules/@storybook/cli/node_modules/envinfo/dist/envinfo.js:1:73314
(node:30336) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30336) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
docs argstable bug tracked

Most helpful comment

I think that fixes it. Please give it a try and let me know if not!

All 12 comments

Did you try removing node_modules and/or lockfiles and reinstalling?

Hey guys 👋🏻

We have the same problem...
image

and

image

The result is always nothing
image

Anybody have a reproduction I can look at?

I'll try to create a separate repo with a small example

We have a maybe similar issue but with expected props not being present.
While the args table on Properties.stories.tsx works just fine…

Text.stories.mdx

import { Text } from './Text.tsx'

<ArgsTable of={Text} />

Text.tsx

export const Text: React.FC<{ id?: string }> = React.forwardRef(function Text(
  { children, id, ...restProps },
  ref
) {
  return (
    <p ref={ref} id={id} {...restProps}>
      {children}
    </p>
  );
});

Args Table

image

OK, repro'd. Investigating! cc @gcofficial

Fix on the way 🙏

Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.1 containing PR #11889 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there's still more to do.

I think that fixes it. Please give it a try and let me know if not!

<Props /> now works once again, thanks so much!

( <ArgsTable /> and <ArgsTable of='.' /> still don't work. )

@dpouliot that's surprising that ArgsTable doesn't work. do you have a repro?

@dpouliot that's surprising that ArgsTable doesn't work. do you have a repro?

https://drive.google.com/file/d/1b_eJxwruAeddJFNeylmBwDbb59mOTsSY/view?usp=sharing

Got it, thanks! @dpouliot

Was this page helpful?
0 / 5 - 0 ratings