When I import jira.js in a Next.js project, the production build fails with the following error:
Module build failed: UnhandledSchemeError: Reading from "node:stream" is not handled by plugins (Unhandled scheme)
The import trace shows the source is inside jira.js:
node:stream
…/node_modules/jira.js/dist/esm/version2/issueAttachments.mjs
…/node_modules/jira.js/dist/esm/version2/index.mjs
…/node_modules/jira.js/dist/esm/index.mjs
This happens because the package’s ESM build uses the Node.js node: URL scheme (e.g. import { Readable } from 'node:stream').
Webpack (used by Next.js) does not yet resolve this scheme by default, so any build that runs through Webpack / SWC errors out.