Open cdedreuille opened 1 month ago
@cdedreuille does using react-docgen-typescript
fix the issue?
https://storybook.js.org/docs/configure/integration/typescript
@shilman thanks, that solved it for me
I am having the same issue and cannot get this to work even with react-docgen-typescript
in the config.
I am seeing react-docgen
in the stack - is this expected?
[storybook:react-docgen-plugin] Argument must be Identifier, Literal, QualifiedTypeIdentifier or TSQualifiedName. Received 'PrivateName'
file: ~/packages/core/dist/index.js
at getNameOrValue (~/node_modules/.pnpm/react-docgen@7.1.0/node_modules/react-docgen/dist/utils/getNameOrValue.js:24:11)
at Object.enter (~/node_modules/.pnpm/react-docgen@7.1.0/node_modules/react-docgen/dist/utils/getMemberExpressionValuePath.js:61:17)
at call (~/node_modules/.pnpm/@babel+traverse@7.25.9/node_modules/@babel/traverse/src/path/context.ts:36:20)
at call (~/node_modules/.pnpm/@babel+traverse@7.25.9/node_modules/@babel/traverse/src/path/context.ts:21:18)
Config:
export default {
stories: ['src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
typescript: {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {},
},
}
Describe the bug
We are trying to move from Storybook 6 to 8. Everything is working fine except for a single story that make Storybook build fail. Here's the output:
For context, here's the actual lines that make it fail: https://github.com/backstage/backstage/blob/bca0b2df4308ce2a07f23df064e5db6f90742712/plugins/org/src/components/Cards/Group/GroupProfile/GroupProfileCard.tsx#L73-L75
Reproduction link
https://github.com/backstage/backstage/tree/storybook8
Reproduction steps
yarn
at the root of the repo/storybook
and install with yarnyarn build-storybook
System
System: OS: macOS 15.0.1 CPU: (10) arm64 Apple M1 Max Shell: 5.9 - /bin/zsh Binaries: Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node Yarn: 3.8.1 - /opt/homebrew/bin/yarn npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm <----- active Browsers: Chrome: 129.0.6668.101 Safari: 18.0.1 npmPackages: @storybook/addon-essentials: ^8.3.5 => 8.3.5 @storybook/addon-interactions: ^8.3.5 => 8.3.5 @storybook/addon-links: ^8.3.5 => 8.3.5 @storybook/addon-onboarding: ^8.3.5 => 8.3.5 @storybook/blocks: ^8.3.5 => 8.3.5 @storybook/react: ^8.3.5 => 8.3.5 @storybook/react-vite: ^8.3.5 => 8.3.5 @storybook/test: ^8.3.5 => 8.3.5 eslint-plugin-storybook: ^0.9.0 => 0.9.0 storybook: ^8.3.5 => 8.3.5 storybook-dark-mode: ^4.0.2 => 4.0.2
Additional context
No response