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
I just ran into an issue and could reproduce it with the latest template.
I use a custom registry for web components and import them to have code completion available and make my IDE happy.
The error I get is:
[plugin:vite:import-analysis] Failed to resolve import "@nectary/components/input" from "src/main.jsx". Does the file exist?
I already tried cachedChecks: false, according to this closed issue #15784 without luck.
Strange thing is that this was running until I removed the node_modules folder and yarn.lock file and did a fresh install. Looking into the local IDE history of my yarn.lock file, I see that I was always using latest version 5.3.1.
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.
Found out that importing with .../index solves the issues but breaks my auto-completion again.
Adding /index.js works for both but is super ugly tbh..
Solved it now by not touching the imports but adding the following alias:
Describe the bug
Hello 👋
I just ran into an issue and could reproduce it with the latest template.
I use a custom registry for web components and import them to have code completion available and make my IDE happy.
The error I get is:
[plugin:vite:import-analysis] Failed to resolve import "@nectary/components/input" from "src/main.jsx". Does the file exist?
I already tried
cachedChecks: false,
according to this closed issue #15784 without luck.Strange thing is that this was running until I removed the
node_modules
folder andyarn.lock
file and did a fresh install. Looking into the local IDE history of myyarn.lock
file, I see that I was always using latest version5.3.1
.Thanks for looking into this.
Reproduction
https://stackblitz.com/edit/vitejs-vite-klgyum?file=main.js
Steps to reproduce
Set up a new project with the following commands:
Modify
src/main.jsx
to use custom registry and element:Run it..
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: