Search code examples
vue.jsyarnpkgvue-clivue-cli-4

vue-cli-service build fails with 0 errors


Is there a way to track down this kind of build problem? I.e. a flag that would show more detailed error information? My project is very much like the default vue cli project. It has been working fine for months until this morning.

$ vue-cli-service build --mode dev

⠏  Building for dev...

 ERROR  Failed to compile with 0 errors                                                     12:06:07 PM

 ERROR  Build failed with errors.
error Command failed with exit code 1.

Solution

  • In this case, I had a file called worker.js which is a web worker being loaded by worker-loader. In worker.js I import a second .js file which imports a missing .js file (due to my error). For whatever reason, this error doesn't make it to the surface of vue-cli-service build.