You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have an Angular 9 Storybook running on TypeScript v3.6.5. I recently tried to upgrade Storybook from v6.1.3 to v6.3.0-rc.0, but ran into a TS compilation error in every file that imported a @storybook package: Cannot find module '@storybook/*'
I was able to trace the issue to the typesVersions listed in each package's package.json. Currently, each package lists something like the following:
When TypeScript resolves file paths using typesVersions, it substitutes the entire matching glob in the replacement glob. In this case, dist/ts3.9/index.d.ts matches the search glob *, so it maps that to dist/ts3.4/dist/ts3.9/index.d.ts, rather than dist/ts3.4/index.d.ts.
Changing the typesVersions to the following fixes the errors:
To Reproduce
I haven't created a minimal reproduction, but I'd expect this to affect any Storybook project using a TypeScript version earlier than v3.8.
Describe the bug
I have an Angular 9 Storybook running on TypeScript v3.6.5. I recently tried to upgrade Storybook from v6.1.3 to v6.3.0-rc.0, but ran into a TS compilation error in every file that imported a
@storybook
package:Cannot find module '@storybook/*'
I was able to trace the issue to the
typesVersions
listed in each package'spackage.json
. Currently, each package lists something like the following:When TypeScript resolves file paths using
typesVersions
, it substitutes the entire matching glob in the replacement glob. In this case,dist/ts3.9/index.d.ts
matches the search glob*
, so it maps that todist/ts3.4/dist/ts3.9/index.d.ts
, rather thandist/ts3.4/index.d.ts
.Changing the
typesVersions
to the following fixes the errors:To Reproduce
I haven't created a minimal reproduction, but I'd expect this to affect any Storybook project using a TypeScript version earlier than v3.8.
System
Additional context
The text was updated successfully, but these errors were encountered: