vue2.0开发时导入组件时出错


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

 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),试试


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM