Skip to content

Commit

Permalink
Stop squashing module loading errors
Browse files Browse the repository at this point in the history
We've apparently been logging, rather than propagating, these errors for 8 years...and that seems very wrong. In particular, if there are test module load errors, they just get logged to the console, but cannot be detected by the test loader and turned into test failures. I think also this causes module load errors to be harder to detect/understand when running apps.

So, stop doing that, and propagate these errors!
  • Loading branch information
bendemboski committed Jan 18, 2024
1 parent 8e72476 commit 1e0e697
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/wrap-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
} catch(error) {
if (error.toString().includes('Error: Could not find module')) {
return requireNode(...args);
} else {
throw error;
}

console.error(error); // eslint-disable-line no-console
}
};

Expand Down

0 comments on commit 1e0e697

Please sign in to comment.