Skip to content

Warnings after install #8699

Closed
Closed

Description

@tomitank

Description updated by @tkajtoch

Describe the bug

My bundler reports warnings related to source map files being unable to resolve. @elastic/eui-theme-borealis and @elastic/eui-theme-common ship with distribution files that include the //# sourceMappingURL=[...] comment, however, the source map files they point to are not included in published packages.

Impact and severity

There's no end-user impact caused by this. It creates a jarring developer experience by seeing these warnings pop up.

Environment and versions

  • EUI version: 102.2.0
  • React version: 18.0
  • Kibana version (if applicable): N/A
  • Browser: N/A
  • Operating System: N/A

To Reproduce

  1. Create a sample application using create-react-app
  2. Add @elastic/eui and @elastic/eui-theme-borealis as dependencies
  3. Setup EUI with the Borealis theme and notice the warnings to appear when building the app

Expected behavior

There should be no source map warnings

Activity

  1. JasonStoltz commented on May 9, 2025

    @JasonStoltz
    Contributor

    Hey @tomitank, happy to help, but can you give us a bit more context? What environment are you running this in, when did you start encountering the issue, steps to reproduce, etc.?

  2. tomitank commented on May 12, 2025

    @tomitank
    Author

    @JasonStoltz hi
    Since version 100 after installing npm or yarn to React 18 using typescript.
    I have the above errors in VSCode terminal. I checked but the files are indeed missing.

  3. added theissue type on May 19, 2025
  4. added
    ⚠️ needs validation
    and removed on May 19, 2025
  5. JasonStoltz commented on May 19, 2025

    @JasonStoltz
    Contributor

    @tkajtoch Can you triage this? Tagging you because I'm wondering if it's related to #8531.

  6. tkajtoch commented on May 29, 2025

    @tkajtoch
    Contributor

    Hi @tomitank! I'm pretty certain this is caused by us not bundling in source maps. While we don't minify published distribution files, they're transpiled to CJS/ESM, which changes their shape a little bit compared to the original sources.

    We discussed this issue recently and decided that since we don't ship minified distribution files, it's not necessary to include source maps in published package files. This is in line with what libraries like docusaurus, react or MUI do.

    The warnings you're seeing are caused by your bundler being unable to resolve source maps for files imported from our package(s). This isn't critical and doesn't affect anything for end users. However, since we decided not to include source maps, we'll update our build configuration not to emit source map pointers and get rid of the warnings you're seeing altogether.

  7. removed
    ⚠️ needs validation
    on May 29, 2025
  8. tkajtoch commented on Jun 6, 2025

    @tkajtoch
    Contributor

    Hi @tomitank! We got this fixed in #8764, which should be released early next week. I'm fairly confident this will resolve your issue, but let me know if that's not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions