导入自定义组件时出现了如下错误

 ERROR  Failed to compile with 1 errors                                 12:35:41


This dependency was not found:

* components/star/star in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?ty
pe=script&index=0!./src/components/header/header.vue

To install it, you can run: npm install --save components/star/star

跪求解决办法


解决方案1:

首先是检查下你的路径有没有错;其次是你import的时候加上.vue后缀试试(components/star/star.vue

解决方法2:

是路径错误;改成(../star/star.vue),试试

相关文章:

  • 2021-07-10
  • 2021-11-26
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2021-05-26
猜你喜欢
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-06-16
  • 2021-04-24
  • 2021-06-16
  • 2021-05-29
相关资源
相似解决方案