Reputation: 126205
My Vue-CLI project is failing to create a production build:
⠏ Building for production...
ERROR Failed to compile with 1 errors 21:21:03
error
js/chunk-vendors.fd39f4a0.js from Terser
undefined
ERROR Build failed with errors.
I can get it to build by disabling Terser. What is quite weird is that I have used this project template many times before, and am not doing anything particularly different in this project (a couple of slightly different modules, but exactly the same build process etc as usual).
In this similar question the output contained a line number which could be used for debugging, but mine doesn't. All I know is that something is undefined.
Google searches suggest that rolling back to specific Terser versions, but:
With a bit of trial and error I have now deduced that the problems lie with importing the module mapbox-gl-draw-circle, but my question remains:
How do you actually investigate (and fix, rather than simply workaround) a problem like this with Terser?
Upvotes: 2
Views: 699