element-plus 按需导入问题 404等问题

场景

新开一个项目,需要用element-plus这个ui库,使用按需引入。
这是我项目的一些版本号

 "element-plus": "^2.7.6",
 "vue": "^3.2.13",
 "vue-router": "^4.0.3",

过程(看解决方法的可以直接往下拉)

按照官网上输入:npm install -D unplugin-vue-components unplugin-auto-import直接安装,控制台报错显示:

Not Found - GET https://nexus01.authine.cn:443/repository/npm-all/unplugin-vue-components/-/unplugin-vue-components-0.27.2.tgz
npm ERR! 404
npm ERR! 404  'unplugin-vue-components@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'fzv_pc_project'

说这个插件并没有注册,找不到这个插件!我懵了,查了下版本号,这么多版本跟我说没有注册!!!!
在这里插入图片描述

控制台输入找不到依赖,然后我去vue ui 安装,安装好后,运行,还是报错!!!!!

显示:AutoImport is not a function

TypeError: Components is not a function

在这里插入图片描述
在这里插入图片描述

解决办法

然后再去百度,下载指定版本,解决

npm install unplugin-auto-import@0.16.1 
npm install unplugin-vue-components@0.25.2

结语

真是一脸懵,官网的语句不能执行,咋没人说过,我百度也没有百度到相关的!还好解决了,浪费我将近3个小时,一直卸载重装删依赖。脑壳都昏了!!!!

相关推荐

  1. Vue:自动导入element-plus图标,动态导入

    2024-07-12 23:08:03       47 阅读
  2. Vue3引入element plus 以及icon

    2024-07-12 23:08:03       66 阅读
  3. Element-plus使用中遇到的问题

    2024-07-12 23:08:03       31 阅读
  4. 第七节 导入elementPlus

    2024-07-12 23:08:03       54 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-12 23:08:03       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-12 23:08:03       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-12 23:08:03       58 阅读
  4. Python语言-面向对象

    2024-07-12 23:08:03       69 阅读

热门阅读

  1. Memcached介绍和详解

    2024-07-12 23:08:03       23 阅读
  2. 论文阅读:A Survey on Evaluation of Large Language Models

    2024-07-12 23:08:03       26 阅读
  3. c#中将数据库中的文件导出为csv、xml文件的demo

    2024-07-12 23:08:03       21 阅读
  4. ceph gps backfill_toofull

    2024-07-12 23:08:03       18 阅读
  5. [NeetCode 150] Products of Array Discluding Self

    2024-07-12 23:08:03       23 阅读
  6. NCNN源码学习(1):Mat详解

    2024-07-12 23:08:03       19 阅读
  7. Spring Boot对接大模型:实战价值与技巧

    2024-07-12 23:08:03       20 阅读
  8. 算法学习记录3

    2024-07-12 23:08:03       21 阅读