Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Not implemented: ChildProcess.prototype.disconnect when using Prisma #17265

Open
Jolg42 opened this issue Jan 4, 2023 · 2 comments
Open

Comments

@Jolg42
Copy link

Jolg42 commented Jan 4, 2023

When using prisma generate we can see in the logs at the bottom

Warning: Not implemented: ChildProcess.prototype.disconnect

Full example

deno run -A --unstable npm:prisma generate --data-proxy
Environment variables loaded from .env
Prisma schema loaded from prisma\schema.prisma
napi_add_env_cleanup_hook is currently not supported
✔ Created ./package.json

added 2 packages, and audited 3 packages in 7s

found 0 vulnerabilities

added 2 packages, and audited 5 packages in 9s

found 0 vulnerabilities

✔ Installed the @prisma/client and prisma packages in your project

✔ Generated Prisma Client (4.9.0-dev.15 | dataproxy) to .\node_modules\@prisma\client in 164ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

To use Prisma Client in edge runtimes like Cloudflare Workers or Vercel Edge Functions, import it like this:
import { PrismaClient } from '@prisma/client/edge'

You will need a Prisma Data Proxy connection string. See documentation: https://pris.ly/d/data-proxy

Warning: Not implemented: ChildProcess.prototype.disconnect

What triggers it is the telemetry in the Prisma CLI which does the following

  // Spawn the child to send telemetry request
  const child = spawn(state)
  child.unref()
  // Closes the IPC channel between parent and child
  child.disconnect()

And the warning can be found at https://github.com/denoland/deno_std/blob/b4239898d6c6b4cdbfd659a4ea1838cf4e656336/node/internal/child_process.ts#L273

It does not impact the functionality as far as we know, but it could be scary for users who might think something is broken (although it is not).

Is it planned to be implemented, maybe? I'm curious to know what you think about this.

@birkskyum
Copy link
Contributor

birkskyum commented Feb 20, 2024

Hit this with the latest Remix:

Version: Deno 1.40.5

Repro:

 deno run -A npm:create-remix@latest --template remix-run/remix/templates/vite         

 remix   v2.4.0 💿 Let's build a better website...

   dir   Where should we create your new project?
         ./new-remix-4

      ◼  Template: Using remix-run/remix/templates/vite...
      ✔  Template copied

   git   Initialize a new git repository?
         Yes

  deps   Install dependencies with npm?
         Yes

Warning: Not implemented: ChildProcess.prototype.disconnect

After the Install dependencies with npm? it'll hang, because it can't disconnect, and when I interrupt it with ctrl-c, then it'll prompt the warning. Related:

@birkskyum
Copy link
Contributor

@Jolg42 , try this with deno upgrade --canary. It should be fixed in:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants