Error Unknown custom element: <el-image> when using Element UI image container

Remember to use the el-image component to report an error in a project, and the error is as follows:

Unknown custom element: <el-image> - did you register the component correctly? 
For recursive components, make sure to provide the "name" option.

After consulting the information, it is found that the element version used in the project does not support this component. Check the package.json file of the project and find that the element ui version used is: 2.4.6. The el-image component was introduced in 2.8.0

insert image description here

Elemtnt UI update log Here you can see that the Image component was added in 2.8.0

insert image description here

Solution: Upgrade the Element UI version
1. To upgrade element-ui, you need to uninstall the original version first

npm uninstall element-ui

2. Then reinstall element-ui

npm i element-ui -S

Guess you like

Origin blog.csdn.net/weixin_43749805/article/details/129598765