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