[Solved] Front end error: Unknown custom element

report errors

chunk-vendors.js:2128 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the “name” option. - did you register the component correctly?For recursive components, make sure to provide the "name" option

 

reason

el component not registered

Solution:

1. Download elementUI

npm i element-ui -S

2. Import

Add the following three lines  in main.js:

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

Done!

Read More: