Webpack failed to compile (without any further error info)

Viewed 1012

I am trying to build a VueJs application with webpack but I am getting an error. Unfortunately no further info is provided on what is the error source might be. This is what I see after running npm run dev:

enter image description here

Since I am new to webpack, I have no idea on how to approach the issue. Is it perhaps possible to make the build process more verbose?

2 Answers

npm run dev will run the scripts.dev section in your package.json

It really depends on what command is defined in scripts.dev

Maybe it is setting some quiet flags when running the dev server or maybe it is firing off a JS file that turns logging off before starting.

If you investigate this you will find the answer yourself :)

Do a webpack build to read the errors (instead of "npm run dev", try "npm run build").

This is a known but rarely discussed and annoying bug in WebPack that has existed for years.

You can do a full build to see the errors in the edge cases where the errors are hidden from you.

Once you fix the errors, you can go right back to "npm run dev".

Related