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

Storybook + Angular CSF Stories causes 'Multiple defintions' error in IE11 #11653

Closed
endlist opened this issue Jul 22, 2020 · 3 comments
Closed

Comments

@endlist
Copy link

endlist commented Jul 22, 2020

Describe the bug
I had been writing simple MDX stories with Angular, but when I started to try to write more complex stories I found it easier to switch to CSF format. Doing so seems to break IE11, though, so the entire Storybook instance fails to load with the sidebar remaining the grey loader boxes and the main window spinning a loader. If the console was open on load or opened and refreshed you'll notice an error Multiple definitions of a property not allowed in strict mode

To Reproduce
Going to either the current or next Angular examples using IE11 (https://next--storybookjs.netlify.app/angular-cli or https://storybookjs.netlify.app/angular-cli/) has the same behavior.

Expected behavior
No error, the page loads successfully.

Screenshots
image
image

Code snippets
An example of how I'm setting up the component in case that's the issue:

// example.component.ts
import { Component } from '@angular/core';

@Component({
  selector: 'lib-example',
  styleUrls: ['./example.component.scss'],
  template: `<div>I do something</div>`
})
export class LibExampleComponent {
  constructor() {}
}

// example.component.stories.ts
import { ExampleComponent } from './example.component';
import { moduleMetadata } from '@storybook/angular';

export default {
  title: 'Components/Example',
  component: ExampleComponent,
  decorators: [
    moduleMetadata({
      declarations: [ExampleComponent]
    })
  ]
}

export const testStory = () => {
  return {
    template: `<lib-example></lib-example>`
  }
}

System:
Please paste the results of npx -p @storybook/cli@next sb info here.

The above command keeps failing with a DeprecationWarning about unhandled promise rejections for some reason, but I'm running @storybook/angular at 5.3.19, MacOS Mojave, Node 10.16.2, npm v6.14.6, and as noted above this seems to be happening on version 6 also if the live Angular examples are up to date.

@shilman
Copy link
Member

shilman commented Jul 31, 2020

Try upgrading to 6.0 RC?

npx sb@next upgrade --prerelease

@stale
Copy link

stale bot commented Aug 22, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Aug 22, 2020
@shilman shilman removed the tracked label Sep 25, 2020
@stale stale bot removed the inactive label Sep 25, 2020
@stale stale bot removed the inactive label Sep 25, 2020
@ndelangen
Copy link
Member

Storybook 7.0 won't support IE11 anymore.

6.5 won't receive updates other than critical security issues, this won't get fixed.

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