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]: Ejecting adds require of file that does not exist #479

Closed
IanVS opened this issue Jun 7, 2024 · 2 comments · Fixed by #483
Closed

[Bug]: Ejecting adds require of file that does not exist #479

IanVS opened this issue Jun 7, 2024 · 2 comments · Fixed by #483
Labels
bug Something isn't working needs triage

Comments

@IanVS
Copy link
Member

IanVS commented Jun 7, 2024

Describe the bug

I ran pnpm test-storybook --eject, and the config file that was created includes

const { getJestConfig } = require('../dist');

Which doesn't exist in my project.

To Reproduce

pnpm test-storybook --eject then try to run the test runner.

System

System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Max
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/Library/Caches/fnm_multishells/92814_1717685993908/bin/node
    npm: 10.7.0 - ~/Library/Caches/fnm_multishells/92814_1717685993908/bin/npm
    pnpm: 8.14.2 - ~/Library/Caches/fnm_multishells/92814_1717685993908/bin/pnpm <----- active
  Browsers:
    Safari: 17.5
  npmPackages:
    @storybook/addon-a11y: 8.1.5 => 8.1.5
    @storybook/addon-essentials: 8.1.5 => 8.1.5
    @storybook/addon-interactions: 8.1.5 => 8.1.5
    @storybook/react: 8.1.5 => 8.1.5
    @storybook/react-vite: 8.1.5 => 8.1.5
    @storybook/test: 8.1.5 => 8.1.5
    @storybook/test-runner: ^0.18.2 => 0.18.2
    @storybook/types: 8.1.5 => 8.1.5
    chromatic: ^11.4.0 => 11.4.0
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: 8.1.5 => 8.1.5

Additional context

No response

@IanVS IanVS added bug Something isn't working needs triage labels Jun 7, 2024
@ctanner-move
Copy link

in case you didnt find the short term fix, you need this instead:
const { getJestConfig } = require('@storybook/test-runner');

@IanVS
Copy link
Member Author

IanVS commented Jun 10, 2024

Yep, thanks, but I think that's what ejecting should add instead of what it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants