unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.66k stars 341 forks source link

Failed to resolve component every time when the project is restarted #714

Open jsoulshine opened 7 months ago

jsoulshine commented 7 months ago

Describe the bug

When I first write a component, the automatic import will take effect, the page can use the component normally, and the project runs normally.

However, when I restart the project, the automatic import will become invalid, and components that could have been displayed normally before will also be unable to be parsed.

At this point, I rewrite a component that still works properly. But if you restart again, neither of the previously written components will be able to be parsed

Console report: Failed to resolve component: xxx

Reproduction

https://github.com/jsoulshine/unplugin-vue-cmp-test HelloWorld in App.vue can not be resolved

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz
    Memory: 822.71 MB / 15.74 GB
  Binaries:
    Node: 16.20.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - D:\nvm\node_global\yarn.CMD
    npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.10.5 - D:\nvm\node_global\pnpm.CMD
  Browsers:
    Edge: Spartan (44.19041.3570.0), Chromium (119.0.2151.58)  
    Internet Explorer: 11.0.19041.3570

Used Package Manager

npm

Validations

itmanyong commented 7 months ago

Amazingly, the NButton on the login page can parse and display normally, but not here, tried various ways, only manual import can restore normal image image image image