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: Rollup: Parse Error: Duplicate export #4424

Closed
3 tasks done
danyball opened this issue May 25, 2023 · 5 comments
Closed
3 tasks done

bug: Rollup: Parse Error: Duplicate export #4424

danyball opened this issue May 25, 2023 · 5 comments
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@danyball
Copy link

danyball commented May 25, 2023

Prerequisites

Stencil Version

3.3.0

Current Behavior

Throws error on npm run build:

[ ERROR ]  Rollup: Parse Error: ./src/components/my-component/my-component.tsx:80:9
           Duplicate export 'MyComponent' (Note that you need plugins to import files that are not JavaScript) Error
           parsing: /Users/XXXX/stencilboilerplate/test/src/components/my-component/my-component.tsx,
           line: 80, column: 9

Expected Behavior

No error.

System Info

MacOS, NPM 8.15.0

Steps to Reproduce

  1. create project: npm init stencil
  2. add private static myVar = "input" to my-component.tsx
  3. also change this line: return format(this.first, this.middle, MyComponent.myVar);
  4. run npm run build

Code Reproduction URL

notyet

Additional Information

Creating a static variable is common to add a native event to the documentation with @event in JSDoc comment. For example:

  /**
   * Emitted when a user clicks on the button.
   * @event
   */
  private static eventInput = "input"
@ionitron-bot ionitron-bot bot added the triage label May 25, 2023
@rwaskiewicz rwaskiewicz self-assigned this May 25, 2023
@rwaskiewicz
Copy link
Member

Thanks @danyball! I've confirmed that this is related to the TypeScript 5 upgrade.

@rwaskiewicz rwaskiewicz added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels May 25, 2023
@rwaskiewicz rwaskiewicz removed their assignment May 25, 2023
@deleonio
Copy link

Yes, we have the same issue, since update stencil from 3.2 to 3.3.

https://github.com/public-ui/kolibri/actions/runs/5081216007/jobs/9129248718

@rwaskiewicz
Copy link
Member

Hey folks,

I have a dev build that I believe will fix the issue. Can anyone running into this problem please install it and provide the team and I with some feedback?

npm i @stencil/core@3.3.0-dev.1685651872.3091be9

Thanks!

@danyball
Copy link
Author

danyball commented Jun 2, 2023

Is working, thanks @rwaskiewicz !

@rwaskiewicz
Copy link
Member

Stencil v3.3.1 has just been released with a fix for this issue. If you encountered it on Stencil v3.3.0, please upgrade to 3.3.1. I'm going to close this issue out, but please feel free to open a new one should the issue reoccur. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

3 participants