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]: Storybook Angular is not compatible with Angular v16: ngcc is still expected #22329

Closed
e-oz opened this issue May 1, 2023 · 7 comments

Comments

@e-oz
Copy link

e-oz commented May 1, 2023

Describe the bug

In attempt to launch a storybook, error:

Package subpath './ngcc' is not defined by "exports" in [..]/node_modules/@angular/compiler-cli/package.json imported from [..]/node_modules/@storybook/angular/dist/server/framework-preset-angular-ivy.js

To Reproduce

No response

System

System:
    OS: macOS 13.3.1
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v20.0.0/bin/yarn
    npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm
  Browsers:
    Safari: 16.4
  npmPackages:
    @storybook/addon-essentials: ^7.0.7 => 7.0.7 
    @storybook/addon-mdx-gfm: ^7.0.7 => 7.0.7 
    @storybook/angular: ^7.0.7 => 7.0.7 
    @storybook/core-server: ^7.0.7 => 7.0.7

Additional context

No response

@nstuyvesant
Copy link

Was just going to put in an issue/question about Angular 16. Because it uses vite, you can't use @storybook/angular because it expects all the old tooling (especially webpack under the covers).

We are adopting Angular 16 aggressively because of Vite. Can anyone recommend any workarounds so we can use Storybook 7 with it?

@nstuyvesant
Copy link

nstuyvesant commented May 1, 2023

Take a look at this... #22096

@shilman
Copy link
Member

shilman commented May 3, 2023

@nstuyvesant @e-oz can either of you confirm the fix on your projects using storybook@future? I'll patch it back to 7.0.x this week but would love some confirmation first.

@shilman
Copy link
Member

shilman commented May 3, 2023

closing as dupe to #22305

@shilman shilman closed this as completed May 3, 2023
@e-oz
Copy link
Author

e-oz commented May 3, 2023

@shilman
I confirm that this issue has been fixed.
Thank you!

@shilman
Copy link
Member

shilman commented May 3, 2023

Thanks so much @e-oz !! Coming soon to a patch release near you 🚀

@nstuyvesant
Copy link

Yeah - I was able to get it working last night. Our component library is built with Vite so had to reinstall the webpack loaders.

Thanks!

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