Why does This dependency was not found? appear when Webpack4 builds a Vue project?

directory structure:

entry entry is index.js, sibling, App.vue, sibling and components/Hello.vue

index is written as follows:

</div>
    <div>Vue Analyze Succeed!{{info}}</div>
  </div>
</template>

<script>
  import Hello from "./components/Hello"
  export default {
    name: "App"
  }
</script>

components/Hello.vue is written as follows:

<template>
  <div>
    <div>A simple Template!</div>
  </div>
</template>

the error message becomes:


This dependency was not found:

* vue in ./src/components/Hello.vue

To install it, you can run: npm install --save vue

it has been confirmed that vue, has been installed and there will be no problem without the component Hello.vue. With the component Hello.vue, an error will be reported, and the solution is why

the most important thing is that there is no problem with build. Hello.vue is successfully injected into App.vue

.

have you solved it?

Menu