Repository: deno
Issue: Adding WebPack to NestJs App - Service ran out of memory and aboorted && Uncaught TypeError: Cannot read properties of undefined (reading 'WORKER_DATA')
Labels: bug,node compat

Version: Deno 2.0.0

Wanted to use webpack HMR for my nestjs app, 
```ts
// webpack-hmr.config.js
// eslint-disable-next-line @typescript-eslint/no-require-imports
const nodeExternals = require('webpack-node-externals');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { RunScriptWebpackPlugin } = require('run-script-webpack-plugin');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = function (options, webpack) {
  return {
    ...options,
    entry: [
      'webpack/hot/poll?100',
      ...(Array.isArray(options.entry) ? options.entry : [options.entry]),
    ],
    externals: [
      nodeExternals({
        allowlist: ['webpack/hot/poll?100'],
      }),
    ],
    plugins: [
      ...options.plugins,
      new webpack.HotModuleReplacementPlugin(),
      new webpack.WatchIgnorePlugin({
        paths: [/\.js$/, /\.d\.ts$/],
      }),
      new RunScriptWebpackPlugin({
        name: options.output.filename,
        autoRestart: false,
      }),
      new ForkTsCheckerWebpackPlugin({
        async: true,
        typescript: {
          configFile: 'tsconfig.build.json',
          mode: 'write-references',
        },
      }),
    ],
  };
};

```

then when i run `Task start:dev nest build --webpack --webpackPath webpack-hmr.config.js --watch`
The Process starts normally: ` Info  Webpack is building your sources...`
Then logs different errors:
```
error: Uncaught TypeError: Cannot read properties of undefined (reading 'WORKER_DATA')
    at getRpcWorkerData (file:///Users/thehoracle/Documents/webdev/nestjs/nest-fundamentals/node_modules/.pnpm/fork-ts-checker-webpack-plugin@9.0.2_typescript@5.3.3_webpack@5.94.0/node_modules/fork-ts-checker-webpack-plugin/lib/rpc/rpc-worker.js:77:34)
    at Object.<anonymous> (file:///Users/thehoracle/Documents/webdev/nestjs/nest-fundamentals/node_modules/.pnpm/fork-ts-checker-webpack-plugin@9.0.2_typescript@5.3.3_webpack@5.94.0/node_modules/fork-ts-checker-webpack-plugin/lib/typescript/worker/lib/worker-config.js:5:45)
    at Object.<anonymous> (file:///Users/thehoracle/Documents/webdev/nestjs/nest-fundamentals/node_modules/.pnpm/fork-ts-checker-webpack-plugin@9.0.2_typescript@5.3.3_webpack@5.94.0/node_modules/fork-ts-checker-webpack-plugin/lib/typescript/worker/lib/worker-config.js:7:4)
    at Module._compile (node:module:748:34)
    at Object.Module._extensions..js (node:module:767:10)
    at Module.load (node:module:665:32)
    at Function.Module._load (node:module:537:12)
    at Module.require (node:module:684:19)
    at require (node:module:808:16)
    at Object.<anonymous> (file:///Users/thehoracle/Documents/webdev/nestjs/nest-fundamentals/node_modules/.pnpm/fork-ts-checker-webpack-plugin@9.0.2_typescript@5.3.3_webpack@5.94.0/node_modules/fork-ts-checker-webpack-plugin/lib/typescript/worker/lib/typescript.js:4:25)
```
```
RpcExitError: Process 10138 exited with code 1
Issues checking service aborted - probably out of memory. Check the `memoryLimit` option in the ForkTsCheckerWebpackPlugin configuration.
If increasing the memory doesn't solve the issue, it's most probably a bug in the TypeScript.
RpcExitError: Process 10139 exited with code 1
Issues checking service aborted - probably out of memory. Check the `memoryLimit` option in the ForkTsCheckerWebpackPlugin configuration.
If increasing the memory doesn't solve the issue, it's most probably a bug in the TypeScript.

```

This does not happen when i run `pnpm run start:dev`. Only with deno.