vue前端npm run dev运行失败

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容

These dependencies were not found: friendly-errors 12:16:30
friendly-errors 12:16:30

  • @/api/banner in ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&
  • @/api/index in ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/index.vue?vue&type=script&lang=js&
                                                                  friendly-errors 12:16:30  
    
    To install them, you can run: npm install --save @/api/banner @/api/index
我的解答思路和尝试过的方法

这是什么原因呢,找好久了

我想要达到的结果

报错是找不到 依赖friendly-errors 你npm install friendly-errors -save 一下

img


这两个文件,找找哪里引用了

你写的组件里import ‘@/api/banner’ 和 ‘@/api/index’报错了,说明要么没两个文件,要么地址写错了

@ 指定别名了么,文件找不到,看看有没有文件,有文件的说明没指定别名,没文件,那你代码写错了