一、环境
vue3,ElementPlus,@vue/cli 5.0.8,npm 9.6.7。
二、报错内容
在vue3框架,views文件夹下的AboutView.vue文件里,执行<el-button>Default</el-button>语句就会报错如下:
Uncaught runtime errors:
×
ERROR
Cannot read properties of null (reading 'isCE')
TypeError: Cannot read properties of null (reading 'isCE')
at renderSlot (webpack-internal:///../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:2641:32)
at eval (webpack-internal:///../../node_modules/element-plus/es/components/button/src/button2.mjs:83:60)
at normalizeChildren (webpack-internal:///../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:6164:34)
at createBaseVNode (webpack-internal:///../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5982:5)
at _createVNode (webpack-internal:///../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:6059:10)
at createVNodeWithArgsTransform (webpack-internal:///../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5931:10)
at createBlock (webpack-internal:///../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5911:21)
at Proxy.eval (webpack-internal:///../../node_modules/element-plus/es/components/button/src/button2.mjs:51:112)
at renderComponentRoot (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:887:38)
at ReactiveEffect.componentUpdateFn [as fn] (webpack-internal:///./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5064:46)
三、解决办法
1)为了明确测试结果,我卸载了npm里安装的npm install element-plus --save。同时在vue里也删除了import element代码的内容
2)在vue项目文件夹下,执行vue ui,在浏览器里进项项目管理,添加图片里的element-plus后就不报错了
标签:core,ElementPlus,..,read,isCE,webpack,vue,runtime,internal From: https://www.cnblogs.com/future725/p/17615960.html