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

Lots of warnings printed when using Vite #12574

Closed
Artur- opened this issue Dec 14, 2021 · 4 comments · Fixed by #13359
Closed

Lots of warnings printed when using Vite #12574

Artur- opened this issue Dec 14, 2021 · 4 comments · Fixed by #13359

Comments

@Artur-
Copy link
Member

Artur- commented Dec 14, 2021

Description of the bug

There seems to be three types of warnings printed when starting a project using Vite for the first time:

  1. [vite] Failed to load source map for /@fs/.../target/flow-frontend/VaadinDevmodeGizmo.js. (Fixed)
  2. @vaadin/accordion is incorrectly packaged. Please contact the package author to fix. (Fixed)
  3. [vite] Failed to load source map for /@fs/.../node_modules/.vite/chunk-HYXO6NXE.js?v=7f5865f8.

While all of the warnings are harmless we still need to fix them

  1. By adding a source map or fixing Vite so it doesn't try to load a source map that doesn't exist
  2. By fixing package.json in our components and potentially ignore the warning for @polymer/*
  3. Figuring out where the timing issue comes from as it is about the browser trying to load "one more file" after Vite has said "stop loading and refresh"
@vursen
Copy link
Contributor

vursen commented Jan 13, 2022

@vaadin/accordion is incorrectly packaged. Please contact the package author to fix.

This kind of warnings is produced by SSR-analysis performed by Vite when a missing dependency is discovered.

We don't use SSR so I reported this in a Vite issue that no SSR-related work should take place when the config.ssr is undefined = the SSR feature is disabled.

@vursen
Copy link
Contributor

vursen commented Jan 14, 2022

[vite] Failed to load source map for /@fs/.../node_modules/.vite/chunk-HYXO6NXE.js?v=7f5865f8.

This kind of warnings is shown because of a race condition that sometimes occurs when the pre-bundling process begins at nearly the same time as an HTTP request to the previously pre-bundled dependency.

Reported this in a Vite issue.

@vursen
Copy link
Contributor

vursen commented Feb 21, 2022

This kind of warnings is shown because of a race condition that sometimes occurs when the pre-bundling process begins at nearly the same time as an HTTP request to the previously pre-bundled dependency.

Let's wait for vitejs/vite#6758 to get merged as it will fix the race condition and hence warnings:

[vite] Failed to load source map for /@fs/.../node_modules/.vite/chunk-HYXO6NXE.js?v=7f5865f8.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.1.0.alpha1 and is also targeting the upcoming stable 23.1.0 version.

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

Successfully merging a pull request may close this issue.

3 participants