'Vue 3: Module not found: Error: path argument is not string

I am having vue application inside static JS app and in vuejs's main.js file I am having 3 lines of code:

import { createApp } from 'vue'
import componentMap from './componentMap'
createApp(componentMap['vue-home-page']).mount("#vueContainer")

App.vue:

<template>
  <h1> VUE Starter Kit </h1>
</template>

<script>
export default {
  name: 'App'
}
</script>

and I am getting error on second line i.e. import App from './App.vue' where it says Module not found: Error: path argument is not a string

componentMap.js:

import App from '.App.vue';
const componentMap = {'vue-home-page': App}
export default componentMap

vue-page.hbs:

<div id='vueContainer'><vue-home-page /></div>

Project Structure:

src
    hbs-app
        page
            index.hbs
            landing-page.hbs
            vue-page.hbs                
    vue-app
        main.js
        App.vue
        componentMap.js


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source