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

Angular 15 publish failing #684

Closed
bmayen opened this issue Nov 29, 2022 · 6 comments
Closed

Angular 15 publish failing #684

bmayen opened this issue Nov 29, 2022 · 6 comments
Labels
bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation

Comments

@bmayen
Copy link

bmayen commented Nov 29, 2022

Builds previously worked fine with Angular 14, but after upgrading to v15 I get the following build error when attempting to publish:

Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.
Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)

This does not happen when I build Storybook locally, only when publishing via Github Action.

✖ Encountered 19 build errors: failing with exit code 2
Pass --allow-console-errors to succeed this command regardless of runtime build errors.
ℹ Review the errors at ...

@bmayen bmayen added bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation labels Nov 29, 2022
@winkerVSbecks
Copy link
Member

@bmayen Chromatic runs the build-storybook command during the build process (different from start-storybook) and so the best place to start is to have you run these commands locally:

  1. npm run build-storybook
  2. npx http-server storybook-static -o

When you do, are there any errors? And after step 2 the browser should load up with your Storybook. Are all of your stories there? Do you see any errors in the console?

@bmayen
Copy link
Author

bmayen commented Nov 30, 2022

Ah, you're right. Problem lies here with the build, not with Chromatic. I'll do some more digging locally now. Thank you.

@bmayen bmayen closed this as completed Nov 30, 2022
@evtk
Copy link

evtk commented Dec 7, 2022

I have exactly the same issue. @bmayen what did you do to get this fixed?

I can spin up the storybook-static locally, and don't receive any zone.js error. Though I do get below error, but story renders without issues.

Uncaught TypeError: __webpack_require__.n is not a function
    at ./node_modules/@storybook/core-client/dist/esm/globals/globals.js (StorybookModule.js:33:1)
    at __webpack_require__ (runtime~styles.4fbabc34.iframe.bundle.js:1:323)
    at __webpack_exec__ (main.af1a19a8.iframe.bundle.js:2:8670975)
    at main.af1a19a8.iframe.bundle.js:2:8671151
    at __webpack_require__.O (runtime~styles.4fbabc34.iframe.bundle.js:1:893)
    at main.af1a19a8.iframe.bundle.js:2:8672187
    at webpackJsonpCallback (runtime~styles.4fbabc34.iframe.bundle.js:1:1579)
    at Array.forEach (<anonymous>)
    at runtime~styles.4fbabc34.iframe.bundle.js:1:1994
    at runtime~styles.4fbabc34.iframe.bundle.js:1:2143

@bmayen
Copy link
Author

bmayen commented Dec 7, 2022

@evtk storybookjs/storybook#20031
Upgrading Storybook to latest fixed this for us.

@bmayen
Copy link
Author

bmayen commented Dec 7, 2022

Also, FYI: storybookjs/storybook#20043

@evtk
Copy link

evtk commented Dec 7, 2022

@bmayen awesome, works! Thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation
Projects
None yet
Development

No branches or pull requests

3 participants