導入自定義組件時出現了如下錯誤
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),試試