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]: import_channels.default is not a constructor #26468

Closed
C0ZEN opened this issue Mar 13, 2024 · 4 comments
Closed

[Bug]: import_channels.default is not a constructor #26468

C0ZEN opened this issue Mar 13, 2024 · 4 comments

Comments

@C0ZEN
Copy link

C0ZEN commented Mar 13, 2024

Describe the bug

In Storybook 8.0.0, when serving a very minimalistic story with React/Vite:

TypeError: import_channels.default is not a constructor
    at mockChannel (http://localhost:4400/@fs/Users/mac//node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-context.js?v=b81ed463:3132:10)
    at AddonStore2.getChannel (http://localhost:4400/@fs/Users/mac//node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-context.js?v=b81ed463:3357:28)
    at useArgs (http://localhost:4400/@fs/Users/mac//node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-context.js?v=b81ed463:6104:24)
    at wrapper (http://localhost:4400/@fs/Users/mac//node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-context.js?v=b81ed463:6366:41)
    at http://localhost:4400/@fs/Users/mac//node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-context.js?v=b81ed463:3584:18
    at http://localhost:4400/@fs/Users/mac//node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-context.js?v=b81ed463:3602:50
    at hookified (http://localhost:4400/sb-preview/runtime.js:84:10607)
    at http://localhost:4400/sb-preview/runtime.js:100:3256
    at http://localhost:4400/sb-preview/runtime.js:100:3717
    at e (http://localhost:4400/@fs/Users/mac/Documents/github/quality-linqueo-back/front/node_modules/.cache/storybook/0ef746ba8a4a30e8870f627459fed3284b52011fc2b4ddf00dca68b8f6e055a6/sb-vite/deps/storybook-react-i18next_preview.js?v=b81ed463:19:11)

To Reproduce

No response

System

System:
    OS: macOS 14.3.1
    CPU: (8) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.asdf/installs/nodejs/20.11.1/bin/node
    npm: 10.2.4 - ~/.asdf/plugins/nodejs/shims/npm <----- active
  Browsers:
    Chrome: 122.0.6261.128
    Safari: 17.3.1
  npmPackages:
    @storybook/addon-a11y: 8.0.0 => 8.0.0 
    @storybook/addon-essentials: 8.0.0 => 8.0.0 
    @storybook/addon-links: 8.0.0 => 8.0.0 
    @storybook/addon-storysource: 8.0.0 => 8.0.0 
    @storybook/core-server: 8.0.0 => 8.0.0 
    @storybook/manager-api: 8.0.0 => 8.0.0 
    @storybook/preset-scss: 1.0.3 => 1.0.3 
    @storybook/react-vite: 8.0.0 => 8.0.0 
    storybook-dark-mode: 3.0.3 => 3.0.3 
    storybook-react-context: 0.6.0 => 0.6.0 
    storybook-react-i18next: 2.1.1 => 2.1.1

Additional context

No response

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Mar 14, 2024

Hi @C0ZEN

Please provide a minimal reproduction via https://storybook.new . Issues with reproductions are more likely to get prioritized.

@C0ZEN
Copy link
Author

C0ZEN commented Mar 15, 2024

After some digging, the root cause is storybook-react-context dependency.
I opened an issue in the repository.

Copy link
Contributor

github-actions bot commented Apr 7, 2024

Hi there! Thank you for opening this issue, but it has been marked as stale because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!

@github-actions github-actions bot added the Stale label Apr 7, 2024
Copy link
Contributor

I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
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

3 participants