You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even in some cases, there will be some other "file not exist" warnings like:
5:44:27 PM [vite] (client) ✨ new dependencies optimized: foo/foo1.mjs, foo/foo-a.cjs, foo/foo-b.cjs, foo/foo-c.mjs, @mdx-js/react, bar
5:44:27 PM [vite] (client) ✨ optimized dependencies changed. reloading
The file does not exist at "/<project-root>/node_modules/.vite/deps/chunk-E6KUT42S.js?v=05fb22f8" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
I'd like to understand what the difference is between Vite 5 and Vite 6, and how to avoid or skip the warning messages being printed if it's not a bug.
5:50:59 PM [vite] (client) ✨ new dependencies optimized: foo/foo.mjs
or:
5:44:27 PM [vite] (client) ✨ new dependencies optimized: foo/foo1.mjs, foo/foo-a.cjs, foo/foo-b.cjs, foo/foo-c.mjs, @mdx-js/react, bar
5:44:27 PM [vite] (client) ✨ optimized dependencies changed. reloading
The file does not exist at "/<project-root>/node_modules/.vite/deps/chunk-E6KUT42S.js?v=05fb22f8" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Jinjiang
changed the title
a dep in absolute path (with alias) isn't scanned in optimize process in Vite 6
a dep import in absolute path (with alias) isn't scanned in optimize process in Vite 6
May 8, 2025
Jinjiang
changed the title
a dep import in absolute path (with alias) isn't scanned in optimize process in Vite 6
a dep import in absolute path (with alias) isn't scanned in optimize process at first in Vite 6
May 8, 2025
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
For special reasons, I have to import some packages in absolute path, like:
with config:
In both Vite 5 and Vite 6 they work as expected, however, in Vite 6, it will cause a warning message like:
I understand the optimize process didn't well reorganize the absolute path import as a package one at first but somehow did it later.
Repro: https://github.com/Jinjiang/reproductions/tree/vite-deps-alias-20250507-2
Even in some cases, there will be some other "file not exist" warnings like:
Repro: https://github.com/Jinjiang/reproductions/tree/vite-deps-alias-20250507 (sorry I can't simplify it further to keep the whole warnings on)
I'd like to understand what the difference is between Vite 5 and Vite 6, and how to avoid or skip the warning messages being printed if it's not a bug.
Thanks.
Reproduction
https://github.com/Jinjiang/reproductions/tree/vite-deps-alias-20250507-2
Steps to reproduce
How to reproduce:
run it in VIte 5
System Info
Used Package Manager
pnpm
Logs
or:
Validations
The text was updated successfully, but these errors were encountered: