Skip to content

Storybook Integration in PNPM Monorepo: "ReferenceError: c is not defined" #27044

Answered by bennoinbeta
bennoinbeta asked this question in Help
Discussion options

You must be logged in to vote

Resolved for now by setting reactDocgen to false in the Storybook TypeScript configuration:

const config = {
    stories: [/* .. */],
    typescript: {
        reactDocgen: false
    },
};

This workaround addresses an issue with React Docgen's handling of components in monorepos or those aggregated through an index.ts file. Reference: Storybook TypeScript Configuration.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bennoinbeta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant