Code Monkey home page Code Monkey logo

Comments (5)

Aietes avatar Aietes commented on April 28, 2024 3

This is also tracked as an issue in Nuxt and nitro: nuxt/nuxt#21768. Other issues like #3918 also refer to the same problem, but it seem it will be solved soon by PR #3927.

The module tries to access globalThis.process, which makes the Cloudflare pages deployment fail. You can't access process in Cloudflare, as it's a node-only API. Technically it should be poyfilled by unenv, but there seems to be an issue preventing this. As a work-around, in our project we are currently patching the respective code in the graphql module.

pnpm patch graphql
code <generated_folder>

In node_modules/graphql/jsutils/instanceOf.mjs remove the code that tries to access process.

export const instanceOf = function instanceOf(value, constructor) {
  return value instanceof constructor
}

Apply the patch.

pnpm patch-commit <generated_folder>

The resulting patch should appear in package.json to be applied during deployment on Cloudflare.

  "pnpm": {
    "patchedDependencies": {
      "[email protected]": "patches/[email protected]"
    }
  }

from graphql-js.

utsavkapoor avatar utsavkapoor commented on April 28, 2024 3

Any updates on the fix ? I was checking the PR but that also doesnt seem to have merged.

from graphql-js.

jgalbsss avatar jgalbsss commented on April 28, 2024 1

Bumping this...

from graphql-js.

websmithcode avatar websmithcode commented on April 28, 2024 1

UP

from graphql-js.

sofialapteva avatar sofialapteva commented on April 28, 2024

UP

from graphql-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.