after configuring modules in webpack, the page reported that the dependencies were not installed, but I have already installed these dependencies, and there is configuration information in package.json.
the error message is as follows:
These dependencies were not found:
* ansi-html in (webpack)-dev-server/client/overlay.js
* axios in ./src/main.js
* html-entities in (webpack)-dev-server/client/overlay.js
* lodash in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/lodash.vue
* loglevel in (webpack)-dev-server/client?http://localhost:8080
* sockjs-client/dist/sockjs in (webpack)-dev-server/client/socket.js
* strip-ansi in (webpack)-dev-server/client?http://localhost:8080
* vue in ./src/App.vue, ./src/main.js and 5 others
* vue-hot-reload-api in ./src/App.vue, ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-7ba5bd90","hasScoped":false,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/App.vue and 8 others
* vue-router in ./src/router/index.js
* webpack/hot in (webpack)-dev-server/client?http://localhost:8080
* webpack/hot/dev-server in multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
* webpack/hot/emitter in (webpack)-dev-server/client?http://localhost:8080
To install them, you can run: npm install --save ansi-html axios html-entities lodash loglevel sockjs-client/dist/sockjs strip-ansi vue vue-hot-reload-api vue-router webpack/hot webpack/hot/dev-server webpack/hot/emitter
the added webpack configuration is as follows:
resolve: {
modules: ["src", "src/components"].map(resolve)
}
if you remove this section of modules configuration, you will not make a mistake.