File make-webpack-errors-comprehensible.patch of Package signal-desktop
A build was failing with an “[object Object]” being thrown from here.
Make it possible to examine the actual exception.
--- vendor/node_modules/webpack/lib/NormalModule.js.orig 2022-11-03 21:26:53.351000000 +0100
+++ vendor/node_modules/webpack/lib/NormalModule.js 2022-11-10 14:51:49.083499444 +0100
@@ -669,7 +669,7 @@
const processResult = (err, result) => {
if (err) {
if (!(err instanceof Error)) {
- err = new NonErrorEmittedError(err);
+ err = new NonErrorEmittedError(JSON.stringify(err));
}
const currentLoader = this.getCurrentLoader(loaderContext);
const error = new ModuleBuildError(err, {