'Relative module was not found in Vue.js when build project

I have a project on Vue.js with Typescript and when I run dev server (prod build too) it returns error in console:

ERROR Failed to compile with 1 errors
This relative module was not found:

*./app.vue in ./src/main.ts

I alredy tried to checkout previous project commits, update global and local packages, clone and build project on other machines, delete and reinstall packages, delete package-lock.json, create new project via vue cli and add project files on new configuration - and nothing was changed. Same error. Very strange for me.

Here is my main.ts

import Vue from 'vue';
import App from './app.vue';
import router from './router';
import store from './store';

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app');

And here App.vue

<template>
  <div id="app" class="container-fluid">
    <header-component></header-component>
    <main id="content" class="content row">
      <transition name="fade">
        <router-view/>
      </transition>
    </main>
    <footer-component></footer-component>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import HeaderComponent from './components/header/header.component';
import FooterComponent from './components/footer/footer.component';

@Component({
  components: {
    HeaderComponent,
    FooterComponent
  }
})
export default class App extends Vue {}
</script>

<style lang="scss">
@import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
@import "../node_modules/font-awesome/css/font-awesome.min.css";
@import "../node_modules/vue2-animate/dist/vue2-animate.min.css";
@import "./styles/main.scss";
</style>

Thanks in advance for help.



Solution 1:[1]

It was a spelling error. I changed

import App from './app.vue';

to

import App from './App.vue';

and it fix the error. Thanx to Derek for help

Solution 2:[2]

It could also be, because your node_modules, is not at the root of the project.

Solution 3:[3]

If you installed your nuxt project using Yarn try deleting the node_modules and then installing using npm i instead. There are some hooks that will not be run by yarn when installing your dependencies for nuxt.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 radbyx
Solution 3 li x