unplugin-vue-components icon indicating copy to clipboard operation
unplugin-vue-components copied to clipboard

Failed to resolve component every time when the project is restarted

Open jsoulshine opened this issue 2 years ago • 3 comments

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

  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [X] The provided reproduction is a minimal reproducible of the bug.

jsoulshine avatar Nov 16 '23 05:11 jsoulshine

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

itmanyong avatar Nov 18 '23 06:11 itmanyong