You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Node compat spawns a subprocess that uses V8 flags, we get an error. This is caused by the fact, that Node accepts V8 flags as "top level" CLI flags, whereas Deno requires them to be a value to --v8-flags= CLI flag.
Quick idea to fix it is to get a list of all V8 flags (deno run --v8-flags=--help) and embed them somewhere in std/node, then when spawning a subprocess iterate over provided arguments and manually contructs --v8-flags= CLI flag passed to Deno).
Steps to Reproduce
env DENO_NODE_COMPAT_URL=file:///Users/ib/dev/deno_std/ env PRISMA_CLIENT_ENGINE_TYPE=binary env PRISMA_CLI_QUERY_ENGINE_TYPE=binary deno run -A --compat --unstable ./node_modules/.bin/prisma generate --data-proxy
Not implemented: process.on("uncaughtException")
Not implemented: process.on("unhandledRejection")
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Error: Generator at /Users/ib/dev/prisma_test/starter/node_modules/@prisma/client/generator-build/index.js could not start:
error: Found argument '--max-old-space-size' which wasn't expected, or isn't valid in this context
If you tried to supply `--max-old-space-size` as a value rather than a flag, use `-- --max-old-space-size`
USAGE:
deno run --compat --unstable --no-check[=<NO_CHECK_TYPE>...] --allow-all <SCRIPT_ARG>...
For more information try --help
Describe the bug
When Node compat spawns a subprocess that uses V8 flags, we get an error. This is caused by the fact, that Node accepts V8 flags as "top level" CLI flags, whereas Deno requires them to be a value to
--v8-flags=
CLI flag.Quick idea to fix it is to get a list of all V8 flags (
deno run --v8-flags=--help
) and embed them somewhere instd/node
, then when spawning a subprocess iterate over provided arguments and manually contructs--v8-flags=
CLI flag passed to Deno).Steps to Reproduce
Expected behavior
No error thrown.
CC @kt3k
The text was updated successfully, but these errors were encountered: