If you're getting build errors when using any of the JavaScript SDKs mentioning something along the lines of "Cannot find module diagnostics_channel", try to configure your build tool to either externalize or ignore the diagnostics_channel
module.
The Sentry Node.js SDK uses this built-in module to instrument Node.js fetch requests.
Some older Node.js versions do not have the diagnostics_channel
API, which may lead to build errors when attempting to bundle your code.
Most bundlers have an option to externalize specific modules (like diagnostics_channel
):