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

apollographql/apollo-server breaks the build #140

Closed
nfroidure opened this issue Sep 2, 2022 · 0 comments · Fixed by #143
Closed

apollographql/apollo-server breaks the build #140

nfroidure opened this issue Sep 2, 2022 · 0 comments · Fixed by #143
Assignees
Labels

Comments

@nfroidure
Copy link
Owner

The build is broken since TypeScript 4.8:

> @whook/graphql@10.0.3 build
> rimraf -f 'dist' && tsc --outDir dist

Error: ../../node_modules/apollo-server-core/dist/types.d.ts(3,50): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("@graphql-tools/schema")' call instead.
lerna ERR! npm run build exited 2 in '@whook/graphql'
lerna WARN complete Waiting for 2 child processes to exit. CTRL-C to exit immediately.
Error: Process completed with exit code 2.

Full logs: https://github.com/nfroidure/whook/runs/8152053130?check_suite_focus=true

Temporary adding:

import type { IMocks } from '@graphql-tools/mock';
+ // @ts-ignore
import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';

Fixes the build, issue reported here: apollographql/apollo-server#6868 (comment)

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

Successfully merging a pull request may close this issue.

1 participant