Skip to content

Mesh SDK TypeScript usage requires skipLibCheck: true - else throws TS1254 in upstream dependency cross-undici-fetch #3711

Closed
@JustusNBB

Description

@JustusNBB

Describe the bug

node_modules/cross-undici-fetch/dist/index.d.ts (12,23)
 TS1254: A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

To Reproduce
Steps to reproduce the behavior:
The issue has already been reported in the upstream repo six weeks ago: ardatan/whatwg-node#18

Expected behavior

No type errors when tsc-(re)compiling SDK client packages into modules.

Environment:

  • OS: Windows/WSL Ubuntu
  • NodeJS: 12/14
  "dependencies": {
    "@graphql-mesh/cache-inmemory-lru": "^0.6.1",
    "@graphql-mesh/merger-stitching": "^0.15.23",
    "@graphql-mesh/openapi": "0.23.26-alpha-05bde4ba4.0",
    "@graphql-mesh/runtime": "^0.32.0",
    "@graphql-tools/utils": "^8.6.1",
    "graphql": "^15.5.0",
    "graphql-jit": "^0.7.3",
    "graphql-tag": "^2.12.6",
    "tslib": "^2.3.1"
  },
  "resolutions": {
    "@graphql-mesh/utils": "0.30.1"
  },
  "devDependencies": {
    "@graphql-mesh/cli": "^0.62.1",

Additional context

My dependency update is currently still unstable.
I also have this new globalContext argument addition to work around (it's not even used...), please explain!

//.mesh/index.ts [
export async function getMeshSDK<TGlobalContext = any, TOperationContext = any>(globalContext: TGlobalContext) {

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