nuxt-graphql-middleware icon indicating copy to clipboard operation
nuxt-graphql-middleware copied to clipboard

Cannot find module 'nuxt-graphql-middleware/dist/runtime/serverOptions' or its corresponding type declarations.

Open Applelo opened this issue 1 year ago • 1 comments

When I do an import of this function 'import { defineGraphqlServerOptions } from 'nuxt-graphql-middleware/dist/runtime/serverOptions', typescript is throwing the following error: Cannot find module 'nuxt-graphql-middleware/dist/runtime/serverOptions' or its corresponding type declarations.

I think it is related to "moduleResolution": "Bundler" added in nuxt with typescript 5 (see https://publint.dev/rules#types_not_exported).

[EDIT] It was activated since Nuxt 3.10 here https://nuxt.com/blog/v3-10#bundler-module-resolution. Reproduction: https://stackblitz.com/edit/graphql-middleware-typing-issue?file=app%2FgraphqlMiddleware.serverOptions.ts

Applelo avatar Feb 07 '24 08:02 Applelo