jasonkuhrt / graphql-request

Minimal GraphQL client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

7 doesnt work on nextjs

Daniel3711997 opened this issue · comments

Description

node:fs/promises does not exists on browsers, nextjs (webpack) does not know how to bundle this

Module build failed: UnhandledSchemeError: Reading from "node:fs/promises" is not handled by plugins (Unhandled scheme). (NextJS)

I have the same problem, I tried searching on the Internet but I didn't find a solution.

Same problem, even when not using nextjs or whatever

The https://github.com/jasonkuhrt/graphql-request/blob/main/src/lib/prelude.ts used so many places. It imports the node:fs/promises

import fs from 'node:fs/promises'
)

Thanks @ert78gb, that helps. I will try to ship a fix on this soon (like today or next few days).