Skip to content

UnhandledSchemeError node:crypto #344

Open
@lowryrussell

Description

Bug description

Error deploying to Vercel on latest 4.4.0 release. It appears node:crypto was introduced in 4.4.0 (#329). I have locked my posthog-node version to 4.3.0 in the meantime as a workaround.

web:build: Failed to compile.
web:build: 
web:build: node:crypto
web:build: Module build failed: UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins (Unhandled scheme).
web:build: Webpack supports "data:" and "file:" URIs by default.
web:build: You may need an additional plugin to handle "node:" URIs.
web:build: node:crypto
web:build: ../../node_modules/.pnpm/[email protected]/node_modules/posthog-node/lib/index.esm.js
web:build: ../../packages/plugins/analytics/posthog/src/index.ts
web:build: ../../packages/analytics/src/index.ts
web:build: ./components/analytics-provider.tsx
web:build: ./components/root-providers.tsx
web:build: 
web:build: 
web:build: > Build failed because of webpack errors

How to reproduce

  1. Install latest 4.4.0 posthog-node package
  2. Deploy to Vercel

Related sub-libraries

  • All of them
  • posthog-web
  • posthog-node
  • posthog-react-native

Additional context

Thank you for your bug report – we love squashing them!

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnodejs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions