Skip to content
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

[Bug]: Renderer detection fails in monorepos #30745

Open
tmeasday opened this issue Mar 4, 2025 · 0 comments
Open

[Bug]: Renderer detection fails in monorepos #30745

tmeasday opened this issue Mar 4, 2025 · 0 comments
Labels

Comments

@tmeasday
Copy link
Member

tmeasday commented Mar 4, 2025

Describe the bug

The "add component" button does not appear in the Chromatic monorepo.

Debugging a little, it is due to global.STORYBOOK_FRAMEWORK = '/absolute/path/to/node_modules/@storybook/experimental-nextjs-vite' where as the detection code expects it to be '@storybook/experimental-nextjs-vite'.

This leads to a lack of a match and the global.STORYBOOK_RENDERER variable not being set.

I expect that this is due to the use of the getAbsolutePath() helper in main.ts as this is a monorepo.

Reproduction link

Chromatic Monorepo

Reproduction steps

No response

System

Storybook Environment Info:

  System:
    OS: macOS 15.3.1
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    Yarn: 4.1.1 - ~/.nvm/versions/node/v20.14.0/bin/yarn <----- active
    npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
  Browsers:
    Chrome: 133.0.6943.142
    Edge: 110.0.1587.57
    Safari: 18.3
  npmPackages:
    @storybook/addon-a11y: ^8.4.7 => 8.4.7
    @storybook/addon-actions: ^8.4.7 => 8.4.7
    @storybook/addon-essentials: ^8.4.7 => 8.4.7
    @storybook/addon-links: ^8.4.7 => 8.4.7
    @storybook/core: ^8.4.7 => 8.4.7
    @storybook/experimental-addon-test: ^8.4.7 => 8.4.7
    @storybook/experimental-nextjs-vite: ^8.4.7 => 8.4.7
    @storybook/manager-api: ^8.4.7 => 8.4.7
    @storybook/nextjs: ^8.4.7 => 8.4.7
    @storybook/react: ^8.4.7 => 8.4.7
    @storybook/test: ^8.4.7 => 8.4.7
    chromatic: ^11.25.2 => 11.25.2
    eslint-plugin-storybook: ^0.11.2 => 0.11.2
    storybook: ^8.4.7 => 8.4.7

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Discussion
Development

No branches or pull requests

2 participants