// let's add process to global variables, so that _events.mjs is happy being able to call process without declaring it
import process from 'node:process'
window.process = process
I run my deno script with deno run --allow-read --allow-write --allow-net --allow-env ./db-maintenance.ts
(I am not a Deno expert, just a node.js developer trying Deno for scripting some database maintenance)
Version: Deno 1.43.1
I have a Deno program using
mysql2
database pool, and running it crashes onHere is the file and a call site - it calls process.emitWarning without requiring process anywhere: https://github.com/denoland/deno/blob/main/ext/node/polyfills/_events.mjs#L471
I had to do this in my code to prevent the crash:
I run my deno script with
deno run --allow-read --allow-write --allow-net --allow-env ./db-maintenance.ts
(I am not a Deno expert, just a node.js developer trying Deno for scripting some database maintenance)