-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
TypeScript: 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 d81ec4c
☁️ Nx Cloud last updated this comment at |
This comment was marked as spam.
This comment was marked as spam.
Package BenchmarksCommit: No significant changes detected, all good. 👏 |
|
@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 |
cannot be named errorscannot be named errors
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.