Provide zblog template_zblog them_wordpress template download and customization

Error causes and solutions of introducing vant into vue3 project

Tianxing Studio 2024-03-12 14:57 course six thousand and eighty-six 0 Comments


Recently, I was working on a vue3 project. It was originally a simple single page, and some common components were written by myself. As a result, the more functions I had, the more I had to worry about later. So I deleted my spicy chicken in time and directly introduced the UI framework of vant.

Results After the van was installed according to the official documents, it was found that an error was directly reported when the van was imported on the page. The van import code is as follows:

The error code is as follows

This error is strange\ Shouldn't the dependent component information be automatically written in. vite deps? I looked through the folder and found no corresponding file.

So I searched on the Internet according to the key words, and found no solution.

Finally, I changed several keywords and finally found an article that gave me a solution, saying that it might be the npm version problem. The original text is as follows:

During the development process, the dependent version of Vue3 changes, and the new version is downloaded directly from the npm install, which will result in the cache of the old version under node_modules, thus affecting the startup and compilation of the local project.

Then I tried to delete the "node_modules" folder first, and then "npm install" again. The problem was solved!


If you encounter the same problem, you can also try to make a backup first and then reinstall the NPM.


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation