-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Export additional types from core-annotations to reduce cannot be named errors
#33344
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
base: next
Are you sure you want to change the base?
Conversation
…med` errors This is an attempt to fix the remaining `Exported variable '...' has or is using name '...' from external module "/..." but cannot be named` errors when using `definedPreview().meta().story()`.
|
Under CSF4 it's not necessary to export Fwiw I remember encountering this before I realised I didn't need to export |
The error comes from exporting anything with
Are you using |
|
Ahh, I only have |
|
This is odd...canot reproduce at all on my repo, but can reproduce on the reproduction repo. It would be ideal if we can get this failing on the sandbox repo too, so that we can catch future regressions. |
If it's any help with that, my company's setup uses a Typescript repo with project references. The root tsconfig.json has (for example) and then the Type checks are run by just running |
|
I've been using this: https://github.com/cyberuni/sb-composite - which is a pretty minimal reproduction. I just can't work out what's the difference between it and mine... |
|
The The export issue in |
In my company's repo I still get the errors for |
|
Well that's very doomed :) Typescript version? |
5.8.3 (with An interesting thing here is that from checking again, the errors with For a simplified example: The The The only difference I can think of that would somehow play into it is that the |
|
View your CI Pipeline Execution ↗ for commit c2f16e3 ☁️ Nx Cloud last updated this comment at |
📝 WalkthroughWalkthroughAdded re-exported type declarations from preview modules to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
✨ Finishing touches
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (5)**/*.{js,jsx,json,html,ts,tsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
code/**/*.{ts,tsx,js,jsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
code/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
code/**/*.{js,jsx,json,html,ts,tsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-11-28T14:50:24.889ZApplied to files:
📚 Learning: 2025-09-24T09:39:39.233ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 127 | 128 | 🚨 +1 🚨 |
| Self size | 1.12 MB | 1.12 MB | 🚨 +36 B 🚨 |
| Dependency size | 21.97 MB | 21.96 MB | 🎉 -11 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/react-native-web-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 159 | 160 | 🚨 +1 🚨 |
| Self size | 30 KB | 30 KB | 🚨 +36 B 🚨 |
| Dependency size | 23.15 MB | 23.14 MB | 🎉 -11 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/react-vite
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 117 | 118 | 🚨 +1 🚨 |
| Self size | 35 KB | 35 KB | 🚨 +17 B 🚨 |
| Dependency size | 19.76 MB | 19.75 MB | 🎉 -11 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
|
@icopp is it possible that you have multiple versions of storybook in your node_modules? Maybe dedupe and/or delete node_modules and reinstall would help. |
That was literally the first thing I checked. There's only one version in |
Relates to #32898
What I did
This is an attempt to fix the remaining
Exported variable '...' has or is using name '...' from external module "/..." but cannot be namederrors when usingdefinedPreview().meta().story().Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
"composite": trueThe complex build system and tangled cross-package imports mean I'm not 100% sure that this will fix all type errors, but I don't think it can make anything worse.
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.