npm run serve
I encountered a problem during the project today . The terminal prompted TypeError: transpileDependencies.map is not a function
that the project could not run.
Solutions found online:
The solutions provided on the Internet are basically:
1. npm audit fix
This error will be reported only after execution - useless
2. node_modules
After deleting the folder, reinstall npm i
- useless
3. npm i
Incomplete installation, using yarn
installation dependencies - useless
4. Modify vue.config.js
the file - useless
The solution on my side is: vue-cli
the version number problem
Some friends on the Internet also pointed out that it is vue-cli
a version problem. I also paid attention to the current version and the previous normal version, and found that the current version is much higher than the previous version.
So: node_modules
After deleting the folder, replace package.json
and package-lock.json
with the previous version, and then restart npm i
.
Finish! ! ! A lot of accumulation, a lot of harvest!