vue 2.0 组件嵌套 标签使用 显示子组件xxx.vue =>dependency was not found in node_modules: 如何解决?
发布于 8 年前 作者 huweivip 5458 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

外层组件:header.vue <template> <home></home> </template>

<script> import home from './components/component/home.vue' export default { name: 'header', data () { return { msg: 'hello vue' } }, components: { home } } </script> <style> </style>

内层组件:home.vue <template>

<input class="from-cmp">
</template> <script> export default { name: 'home', data () { return { msg: 'Welcome to Your Vue.js App' } } } </script> <style> </style>

npm run dev错误: This dependency was not found in node_modules:

  • ./components/component/home.vue
回到顶部