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]: Uncaught ReferenceError: require is not defined in iframe-XSCbtsal.js #25799

Closed
TechQuery opened this issue Jan 29, 2024 · 1 comment
Closed

Comments

@TechQuery
Copy link

Describe the bug

When I upgrade ES decorator from TS legacy to stage-3, this error thrown in Web browser:

Uncaught ReferenceError: require is not defined
    at iframe-XSCbtsal.js:1:1006

To Reproduce

  1. Git clone [migrate] upgrade to ES Decorator stage-3 & Husky 9 idea2app/Idea-React#51
  2. run commands below in the project root:
    pnpm i
    pnpm preview:storybook

System

System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  Binaries:
    Node: 18.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.13.1 - C:\Program Files\nodejs\pnpm.CMD <----- active
  Browsers:
    Edge: Chromium (121.0.2277.83)
  npmPackages:
    @storybook/addon-console: ^3.0.0 => 3.0.0
    @storybook/addon-essentials: ^7.6.10 => 7.6.10
    @storybook/addon-interactions: ^7.6.10 => 7.6.10
    @storybook/addon-links: ^7.6.10 => 7.6.10
    @storybook/addon-storysource: ^7.6.10 => 7.6.10
    @storybook/blocks: ^7.6.10 => 7.6.10
    @storybook/react: ^7.6.10 => 7.6.10
    @storybook/react-vite: ^7.6.10 => 7.6.10
    @storybook/testing-library: ^0.2.2 => 0.2.2
    storybook: ^7.6.10 => 7.6.10

Additional context

No response

@TechQuery
Copy link
Author

I fix this error by myself: idea2app/Idea-React@70311ea

The reason is Storybook CLI & Vite throw no error while Babel has no TypeScript preset configured...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants