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]: Storyshot fails with TypeError: Cannot read properties of undefined (reading 'readdirSync') #20624

Closed
SimenB opened this issue Jan 15, 2023 · 2 comments
Assignees

Comments

@SimenB
Copy link
Contributor

SimenB commented Jan 15, 2023

Describe the bug

See https://www.runpkg.com/?@storybook/[email protected]/dist/frameworks/frameworkLoader.js#4 and https://www.runpkg.com/?@storybook/[email protected]/dist/frameworks/frameworkLoader.js#9. fs is plain required, but then tried to access via .default without the interop code. Something in the transpilation is off.

To Reproduce

See above

System

System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.19.0 - /private/var/folders/v4/wwfy9s191x577dcxnlkx5vsc0000gn/T/xfs-93f4dd4c/node
    Yarn: 3.3.1 - /private/var/folders/v4/wwfy9s191x577dcxnlkx5vsc0000gn/T/xfs-93f4dd4c/yarn
    npm: 9.2.0 - ~/.nvm/versions/node/v16.19.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Firefox: 108.0.1
    Safari: 16.2

Additional context

No response

@valentinpalkovic
Copy link
Contributor

@ndelangen This Has something to do with how the prepare/tsc.ts script works, I think we have to add esModuleInterop: true to the createProgram options. Then the error is gone.

I have exactly the same issue.

@shilman
Copy link
Member

shilman commented Jan 17, 2023

Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.29 containing PR #20630 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb@next upgrade --prerelease

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

@shilman shilman closed this as completed Jan 17, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Core Team Projects Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants