跨境派

跨境派

跨境派,专注跨境行业新闻资讯、跨境电商知识分享!

当前位置:首页 > 工具系统 > 广告工具 > 完美解决 Compiled with problems: × ERROR Cannot read properties of undefined (readin

完美解决 Compiled with problems: × ERROR Cannot read properties of undefined (readin

时间:2024-03-26 13:46:02 来源:网络cs 作者:纳雷武 栏目:广告工具 阅读:

标签: 解决  完美 

启动vue ui 使用npm  run  serve编译启动时 , 出现以下问题:

Compiled with problems:

x

ERROR

Cannot read properties of undefined (reading 'use') TypeError: Cannot read properties of undefined (reading 'use') at eval (webpack-internal:///./src/plugins/element.js:13:45) at ./src/plugins/element.js (http://localhost:8080/js/app.js:96:1) at webpack_require (http://localhost:8080/js/app.js:337:33) at fn (http://localhost:8080/js/app.js:592:21) at eval (webpack-internal:///./src/main.js:5:77) at ./src/main.js (http://localhost:8080/js/app.js:85:1) at webpack_require (http://localhost:8080/js/app.js:337:33) at http://localhost:8080/js/app.js:1517:109 at webpack_require.O (http://localhost:8080/js/app.js:383:23) at http://localhost:8080/js/app.js:1518:53

错误截图如下:

 解决方法: 

1. 重新创建一个新项目

2. 重新安装依赖. 出现这个问题我是因为我的依赖没有安装好

npm install -g vue 安装全局vue

npm install -g @vue/cli 安装vue脚手架 ,加一个@是最新的版本

3. 修改main.js里面代码   导入包的方式不对

import { createApp } from 'vue'import App from './App.vue'import router from './router/index'const app = createApp(App)app.use(router).mount('#app')

定义一个变量去存,使用变量去调用

本文链接:https://www.kjpai.cn/news/2024-03-26/148927.html,文章来源:网络cs,作者:纳雷武,版权归作者所有,如需转载请注明来源和作者,否则将追究法律责任!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。

文章评论