Skip to content

cloudflare:sockets import error #711

Closed
@maxifom

Description

@maxifom

I was using https://github.com/t3-oss/create-t3-turbo to create app. It uses drizzle and planetscale, i changed it to use postgres, but it gives error

ModuleBuildError: Module build failed: UnhandledSchemeError: Reading from "cloudflare:sockets" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "cloudflare:" URIs.
    at /home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/webpack/bundle5.js:28:399825
    at Hook.eval [as callAsync] (eval at create (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/webpack/bundle5.js:13:28867), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/webpack/bundle5.js:13:26021)
    at Object.processResource (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/webpack/bundle5.js:28:399750)
    at processResource (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
    at iteratePitchingLoaders (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
    at runLoaders (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
    at NormalModule._doBuild (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/webpack/bundle5.js:28:399612)
    at NormalModule.build (/home/max/WebstormProjects/turbo-openfinance/node_modules/next/dist/compiled/webpack/bundle5.js:28:401640)

because of await import ("cloudflare:sockets") in polyfilles. Any ideas how to fix it?

Github repo with steps to reproduce:
https://github.com/maxifom/postgresjs-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions