VUE 2:在另一个组件的 <template> 中引用 VUE 组件。模块未找到异常

VUE 2 : Referencing VUE component inside another component's <template>. Module not found exception

我已经在谷歌上搜索了很长一段时间以弄清楚为什么..我的模态组件在我的 vieworder.vue 组件中无法被识别。

我收到了:

ERROR in ./~/babel-loader/lib!./~/vue-loader/lib/selector.js?
type=script&index=0!./src/components/ViewOrder.vue

Module not found: Error: Can't resolve './components/Modal.vue' in 
'C:\xxxxxx\xxxxxxxxx\src\components'

ViewOrder.vue - 模态的用法:

<template>
    <div class="col-sm-10 col-sm-offset-1" v-if="order">
        <modal v-if="showModal" @close="showModal = false">
        </modal>   
    </div>
</template>

<script>

import * as types from '../store/mutationtypes'
import { mapGetters, mapActions } from 'vuex'
import Modal from './components/Modal.vue'

export default {
    name: 'ViewOrder',
    components: {
        'modal': Modal
    }
    ....

Modal.vue

<template>
    ....
</template>

<script>
    export default {
        name: "modal"
    }
</script>

Main.js - 参考:

....
import Modal from './components/Modal.vue'
import ViewOrder from './components/ViewOrder.vue'
....

import Modal from './components/Modal.vue'

应该是import Modal from './Modal.vue'

当您进入 ViewOrder.vue

时,您已经在 components 文件夹中