error Compile error:
Failed to compile, check the errors for troubleshooting.
File: ./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js
× Resolve error: Can't resolve 'stream' in '/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs'
╭─[11:1]
11 │ 'use strict';
12 │ var React = require('react');
13 │ var stream = require('stream');
· ─────────────────
14 │ var ReactVersion = '18.2.0';
15 │ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
╰────
Tip: "stream" is a built-in Node.js module and cannot be imported in client-side code.
Check if you need to import Node.js module. If needed, you can use "@rsbuild/plugin-node-polyfill".
Version
Details
error Compile error: Failed to compile, check the errors for troubleshooting. File: ./node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js × Resolve error: Can't resolve 'stream' in '/node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs' ╭─[11:1] 11 │ 'use strict'; 12 │ var React = require('react'); 13 │ var stream = require('stream'); · ───────────────── 14 │ var ReactVersion = '18.2.0'; 15 │ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; ╰────
Tip: "stream" is a built-in Node.js module and cannot be imported in client-side code. Check if you need to import Node.js module. If needed, you can use "@rsbuild/plugin-node-polyfill".
Reproduce link
无
Reproduce Steps
pnpm add ag-grid-react
a.jsx
in mdx file =>
import Demo from './a.jsx'; OR <code src='./a.jsx' />