Error Module not found after vue project npm run build

import @/components/componentA
Mar.24,2021

you can try downloading node_modules again


to see what module, is missing. If it is on npm, see if there is this package in package.json. If not, npm install this package. There is another situation where your file is missing


.

this is usually caused by the migration of the environment, installing the missing ones back one by one.

in addition, the server build operation has never been seen before. The development environment build, deploys files in the dist directory


I have just found a solution to this problem. This is because I omitted Index.vue, (the directory structure has just been added to the problem) when I referenced the component. The local recognition will be automatic, but the build on the server will report an error.

Menu