Vue项目导入插件(vue项目报错This dependency was not found)

步骤:
(1)项目目录下进行插件的安装
Vue项目导入插件(vue项目报错This dependency was not found)_第1张图片
(2)import xxx from xxx,后使用
在这里插入图片描述

否则:没有步骤一(即在非项目目录下安装了插件也没用)
会报错:
Vue项目导入插件(vue项目报错This dependency was not found)_第2张图片

Failed to compile with 1 error
                                                                                    
This dependency was not found:

* element-plus in ./src/main.js

To install it, you can run: npm install --save element-plus

你可能感兴趣的:(vue.js)