Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled rejection when starting nuxt #286

Open
itzaks opened this issue Dec 29, 2022 · 0 comments
Open

Unhandled rejection when starting nuxt #286

itzaks opened this issue Dec 29, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@itzaks
Copy link

itzaks commented Dec 29, 2022

Environment

  • Operating System: Darwin
  • Node Version: v16.17.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: yarn@1.22.19
  • Builder: vite
  • User Config: typescript, telemetry, modules, runtimeConfig
  • Runtime Modules: @unocss/nuxt@0.48.0, @unocss/nuxt@0.48.0, nuxt-graphql-client@0.2.24
  • Build Modules: -

Describe the bug

When I'm starting up nuxt with nuxt dev I always get thrown the error

 ERROR  [unhandledRejection] First parameter has member 'readable' that is not a ReadableStream.                                                                                     10:46:09

  at assertReadableStream (node_modules/ohmyfetch/node_modules/node-fetch-native/dist/shared/node-fetch-native.b703cef9.mjs:428:21)
  at convertReadableWritablePair (node_modules/ohmyfetch/node_modules/node-fetch-native/dist/shared/node-fetch-native.b703cef9.mjs:3505:11)
  at ReadableStream.pipeThrough (node_modules/ohmyfetch/node_modules/node-fetch-native/dist/shared/node-fetch-native.b703cef9.mjs:3580:33)
  at fetchFinale (node_modules/undici/lib/fetch/index.js:976:52)
  at mainFetch (node_modules/undici/lib/fetch/index.js:776:5)
  at processTicksAndRejections (node:internal/process/task_queues:96:5)

Tracing the strack trace it comes from the generate function, when running the graphql codegen.

const outputFiles = await context.profiler.run(() => executeCodegen(context), "executeCodegen");

This is run with the following config:

Generate {                                                                                                                   11:09:28
  clients: {
    default: {
      token: [Object],
      proxyCookies: true,
      tokenStorage: [Object],
      preferGETQueries: false,
      host: 'http://localhost:8888/api/graphql'                                                                              11:09:26
    }
  },
  plugins: [
    'typescript',
    'typescript-operations',
    'typescript-graphql-request'
  ],
  documents: [
     // list of my graphql-files
  ],
  resolver: {
    resolve: [Function: resolve],
    resolvePath: [Function: resolvePath]
  },
  clientDocs: {
    default: [
     // list of my graphql-files
    ]
  },
  silent: true,
  skipTypename: true,
  useTypeImports: true,
  dedupeFragments: true,
  disableOnBuild: false,
  onlyOperationTypes: true
} {
  silent: true,
  generates: {
    'default.ts': {
      config: [Object],
      schema: [Array],
      plugins: [Array],
      documents: [Array]
    }
  }
}
@itzaks itzaks added the bug Something isn't working label Dec 29, 2022
@Diizzayy Diizzayy self-assigned this Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants