This is because the parser names of different versions of prettier are not the same, so it cannot be parsed. You just need to node_ Modules in Vue loader The parser in the prettier configuration file can be changed from Babylon to Babel.
Step 12345 as shown in the figure below
Read More:
- Module build failed: Error: Couldn’t find preset “es2015” relative to directory
- Module not found: Error: Can‘t resolve ‘core-js/modules/es.promise.js‘ in
- [Solved] Module build failed: Error: Vue packages version mismatch
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- [Solved] Vue-cli Error: Module not found: Error: Can‘t resolve ‘vue-router ‘
- [Solved] Node error: Error: Cannot find module ‘body-parser‘
- [Solved] ERROR in ./src/main.ts Module not found: Error: Can‘t resolve ‘xxx‘
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- [Solved] Module build failed TypeError this.getOptions is not a function at Object.loader
- [Solved] Vue Error: Module build failed: Error: No PostCSS Config found in
- [Solved] Vue calls style loader error: Module build failed: CssSyntaxError
- [Solved] Vue Project Error: Module build failed: Error: Missing binding
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- Can’t resolve ‘ansi-html-community’ & Cannot find module ‘is-docker (vuex-persistedstate Installed)
- ArcGIS API for JavaScript version 4. X updated and the project startup error: Module parse failed: Unexpected token(… …
- Failed to resolve async component default: ChunkLoadError: Loading chunk 7 failed
- [Solved] react-quill failed to install error: Could not resolve dependency
- [Solved] Vue Project Start Error: Support for the experimental syntax ‘jsx‘ isn‘t currently enabled
- [Solved] Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘
- [Solved] webpack Package Error: ERROR in multi ./src/main.js ./dist/bundle.js Module not found: Error: Can‘t resolv