一、环境
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后就不报错了
- ElementPlus properties reading Cannot Vue3elementplus properties reading cannot properties undefined reading cannot properties typeerror reading cannot pickalgorithm properties reading cannot parentelement properties reading cannot properties typeerror undefined reading null property cannot called typeerror undefined property cannot taro properties undefined reading clearvalidate undefined property cannot