导入自定义组件时出现了如下错误
ERROR Failed to compile with 1 errors 12:35:41This dependency was not found:* components/star/star in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/header/header.vueTo install it, you can run: npm install --save components/star/star
跪求解决办法
解决方案1:
首先是检查下你的路径有没有错;其次是你import的时候加上.vue
后缀试试(components/star/star.vue
)
解决方法2:
是路径错误;改成(../star/star.vue),试试