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

Addon-controls: esm is not defined error #15773

Closed
dexster opened this issue Aug 6, 2021 · 12 comments
Closed

Addon-controls: esm is not defined error #15773

dexster opened this issue Aug 6, 2021 · 12 comments

Comments

@dexster
Copy link
Contributor

dexster commented Aug 6, 2021

Describe the bug
Site breaks when navigating to https://next--storybookjs.netlify.app/angular-cli/?path=/story/addons-controls--basic

Check the Console
vendors~main.329f7787c62cee5c3a74.manager.bundle.js:2 ReferenceError: esm is not defined

@khylerlin
Copy link

khylerlin commented Aug 6, 2021

We are facing the same issue from some of our stories when navigate through controls.

@shilman
Copy link
Member

shilman commented Aug 7, 2021

@khylerlin which version are you using, and do you happen to know which version the issue started to appear in?

@khylerlin
Copy link

@shilman We are now using 6.4.0-alpha.20, and not sure what version started to appear this issue. I encountered this issue almost the issue has been created on Aug 6.

@w-p
Copy link

w-p commented Aug 9, 2021

node: 14.17
npm: 7.17
angular: 12.1
storybook: 6.4.0-alpha.28

This issue occurs on a variety of alpha builds. Moreover, it works fine when running Storybook locally via start-storybook. When performing a build via build-storybook the build completes successfully but, when viewed in a browser, produces the below output on all but the most simplistic components.

image

@w-p
Copy link

w-p commented Aug 10, 2021

Update. After refreshing the page on a component that causes the issue about, the below additional errors are logged.

image

@w-p
Copy link

w-p commented Aug 10, 2021

Additionally, #15710 is correct in the explanation of behavior but the proposed downgrade does not work. Load the page, navigate to a component that works, click the actions tab, navigate to a component that previously failed and the component is rendered. However, some additional deprecation warnings are emitted.

Interestingly, the components which appear to cause the failure also have Angular @Output event emitters.

image

@shilman shilman changed the title Storybook site breaks for some stories Addon-controls: esm is not defined error Aug 10, 2021
@atomicrobokid
Copy link

Screenshot 2021-08-10 at 16 58 47

Seeing exactly the same thing here, stripped back the story to as minimal as possible and see this on the built version (not when running the server locally)

@gaetanmaisse
Copy link
Member

I found the guilty commits, investigation in progress in #15812.

@ld210
Copy link

ld210 commented Aug 11, 2021

Same here, we're facing the same issue (except on local server).

storybook: 6.3.6
storybook/builder-webpack5: 6.4.0-alpha.1
angular: 12.1.0

node: 14.17.4
npm: 6.14.14

@navin-moorthy
Copy link

Works for me till v6.4.0-alpha.16

"@storybook/addon-a11y": "6.4.0-alpha.16",
"@storybook/addon-actions": "6.4.0-alpha.16",
"@storybook/addon-essentials": "6.4.0-alpha.16",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/react": "6.4.0-alpha.16",

@shilman
Copy link
Member

shilman commented Aug 14, 2021

Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.30 containing PR #15812 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Aug 14, 2021
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

9 participants