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

Type errors when running examples #2254

Open
4 tasks
rosman21 opened this issue Jun 14, 2024 · 0 comments
Open
4 tasks

Type errors when running examples #2254

rosman21 opened this issue Jun 14, 2024 · 0 comments

Comments

@rosman21
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a
    minimal reproduction available on
    Stackblitz.
    • Please install the latest @envelop/* packages that you are using.
    • Please make sure the reproduction is as small as possible.
  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

after doing a pnpm install & pnpm run build

I navigate to the examples directory and I am getting a type error

npm run start

> @envelop-examples/[email protected] start
> ts-node index.ts

/Users/reneosman/Desktop/projects/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
index.ts:34:3 - error TS2345: Argument of type '{ parse: (source: string | Source, options?: ParseOptions) => DocumentNode; validate: (schema: GraphQLSchema, documentAST: DocumentNode, rules?: readonly ValidationRule[], options?: { ...; }, typeInfo?: TypeInfo) => readonly GraphQLError[]; execute: (args: ExecutionArgs) => PromiseOrValue<...>; subscribe: (args: Exe...' is not assignable to parameter of type '{ plugins: Plugin<{}>[]; enableInternalTracing?: boolean; }'.
  Object literal may only specify known properties, and 'parse' does not exist in type '{ plugins: Plugin<{}>[]; enableInternalTracing?: boolean; }'.

34   parse,
     ~~~~~

    at createTSError (/xxxx/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/xxxxx/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/xxxxx/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/xxxxx/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/xxxxxx/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Object.require.extensions.<computed> [as .ts] (/xxxxx/envelop/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Function.Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  diagnosticCodes: [ 2345 ]
}

Screenshot 2024-06-14 at 2 23 45 PM

To Reproduce Steps to reproduce the behavior:

clone repo
pnpm install
pnpm run build
cd examples
pnpm run start

Expected behavior

it should run the project

Environment:

  • OS: Mac OS 14.5
  • NodeJS: v18.17.0
  • @envelop/* versions:
    • @envelop/core: ??? latest

Additional context

Is there something I am missing here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant