Skip to content

Type errors when running examples #2254

Open
@rosman21

Description

@rosman21

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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