Repository: deno
Issue: TypeError: expected i32
Labels: bug,node compat,ext/http,node:http

Version: Deno 2.1.1

I wrote an LTI integration using ltijs as an node app. Then I tried to move the code into an edge function and it fails with the following error:

```
runtime has escaped from the event loop unexpectedly: event loop error: TypeError: expected i32
    at IncomingMessageForClient._read (node:http:781:10)
    at Readable.read (ext:deno_node/_stream.mjs:2995:16)
    at resume_ (ext:deno_node/_stream.mjs:3345:16)
    at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
    at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
    at eventLoopTick (ext:core/01_core.js:175:21)
failed to send request to user worker: event loop error: TypeError: expected i32
    at IncomingMessageForClient._read (node:http:781:10)
    at Readable.read (ext:deno_node/_stream.mjs:2995:16)
    at resume_ (ext:deno_node/_stream.mjs:3345:16)
    at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
    at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
    at eventLoopTick (ext:core/01_core.js:175:21)
user worker failed to respond: event loop error: TypeError: expected i32
    at IncomingMessageForClient._read (node:http:781:10)
    at Readable.read (ext:deno_node/_stream.mjs:2995:16)
    at resume_ (ext:deno_node/_stream.mjs:3345:16)
    at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
    at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
    at eventLoopTick (ext:core/01_core.js:175:21)
InvalidWorkerResponse: event loop error: TypeError: expected i32
    at IncomingMessageForClient._read (node:http:781:10)
    at Readable.read (ext:deno_node/_stream.mjs:2995:16)
    at resume_ (ext:deno_node/_stream.mjs:3345:16)
    at processTicksAndRejections (ext:deno_node/_next_tick.ts:33:15)
    at runNextTicks (ext:deno_node/_next_tick.ts:71:3)
    at eventLoopTick (ext:core/01_core.js:175:21)
    at async Promise.allSettled (index 1)
    at async UserWorker.fetch (ext:sb_user_workers/user_workers.js:72:61)
    at async Object.handler (file:///root/index.ts:173:14)
    at async respond (ext:sb_core_main_js/js/http.js:163:14) {
  name: "InvalidWorkerResponse"
}
```

While working with the node app I was able to modify the ltijs code in the node_modules to pinpoint any issues. This is no longer possible since I moved everything into Supabase edge functions.

The library uses the node module [debug](https://www.npmjs.com/package/debug) for logging. But when I try to turn on logging using an environment variable I get a completely new error.

```
runtime has escaped from the event loop unexpectedly: event loop error: NotSupported: The operation is not supported
    at Object.setEnv [as set] (ext:sb_env/env.js:5:9)
    at Object.set (ext:deno_node/_process/process.ts:66:14)
    at Function.save (file:///var/tmp/sb-compile-edge-runtime/node_modules/localhost/debug/4.3.7/src/node.js:205:21)
    at Function.enable (file:///var/tmp/sb-compile-edge-runtime/node_modules/localhost/debug/4.3.7/src/common.js:163:15)
    at file:///Users/joel/IdeaProjects/business-simulation/supabase/functions/ltijs/index.ts:6:7
```

Does this mean that certain node features required by this library are not yet supported by Deno?

Without logging or being able to modify the ltijs library I am unsure how to further narrow down the problem. 

Here is my code:
```ts
import { Provider as lti } from 'ltijs';
import Database from './DB.ts';
import pg from 'pg';

// Setup ltijs-sequelize using the same arguments as Sequelize's generic contructor
// Database is hosted under http://localhost:54322/
const db = new Database('postgres', 'postgres', 'postgres', {
    host: '172.17.0.1',
    port: 54322,
    dialect: 'postgres',
    schema: 'lti',
    dialectModule: pg,
    logging: true,
});

// Setup provider
lti.setup(
    'LTIKEY', // Key used to sign cookies and tokens
    {
        plugin: db,
    },
    {
        // Options
        appRoute: '/ltijs/launch',
        loginRoute: '/ltijs/login', // Optionally, specify some of the reserved routes
        cookies: {
            secure: false, // Set secure to true if the testing platform is in a different domain and https is being used
            sameSite: '', // Set sameSite to 'None' if the testing platform is in a different domain and https is being used
        },
        devMode: true, // Set DevMode to false if running in a production environment with https
    },
);

// Set lti launch callback
lti.onConnect((token, req, res) => {
    console.log('onConnect');
    console.log(token);
    return res.send("It's alive!");
});

const setup = async () => {
    // Deploy server and open connection to the database
    await lti.deploy({ port: 3000 }); // Specifying port. Defaults to 3000

    // Register platform
    await lti.registerPlatform({
        url: 'https://saltire.lti.app/platform',
        name: 'Saltire LTI App',
        clientId: 'saltire.lti.app',
        authenticationEndpoint: 'https://saltire.lti.app/platform/auth',
        accesstokenEndpoint: 'https://saltire.lti.app/platform/token/30d3313d7c655cdc2e722bafeb7374b9',
        authConfig: {
            method: 'JWK_SET',
            key: 'https://saltire.lti.app/platform/jwks/30d3313d7c655cdc2e722bafeb7374b9',
        },
    });
};

setup();
```