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

TypeError: (0 , core_1.useEngine) is not a function, nest e2e testing #3557

Open
khaledosama999 opened this issue Dec 16, 2024 · 0 comments
Open

Comments

@khaledosama999
Copy link

khaledosama999 commented Dec 16, 2024

Describe the bug

When building and running the app it runs fine, but using nest e2e testing package to bundle the app and run tests on it I get the following error for all e2e tests

    TypeError: (0 , core_1.useEngine) is not a function

      59 |
      60 |     jwtVerifySpy.mockImplementation(() => true);
    > 61 |     await app.init();
         |     ^
      62 |   });
      63 |
      64 |   beforeEach(() => {

      at new YogaServer (node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-yoga/cjs/server.js:108:34)
      at createYoga (node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-yoga/cjs/server.js:385:20)
      at YogaFederationDriver.registerExpress (node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_oxo2rmvaldwsgk6mcmonczfv2u/node_modules/@graphql-yoga/nestjs/dist/cjs/index.js:45:52)
      at YogaFederationDriver.start (node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_oxo2rmvaldwsgk6mcmonczfv2u/node_modules/@graphql-yoga/nestjs/dist/cjs/index.js:21:25)
      at YogaFederationDriver.start (node_modules/.pnpm/@[email protected]_@[email protected][email protected]__@nestjs+com_jwbcq27ulnu7k2ibeiv5o5vu7a/node_modules/@graphql-yoga/nestjs-federation/dist/cjs/index.js:30:21)
      at GraphQLModule.onModuleInit (node_modules/.pnpm/@[email protected]_@[email protected][email protected]__@[email protected]_class-tr_qzb5r5le62br7g32us6xbyzc5q/node_modules/@nestjs/graphql/dist/graphql.module.js:123:36)
      at async callModuleInitHook (node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_re_d3isqskvgxfv552ewapjkdxmvq/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)
      at async Proxy.callInitHook (node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_re_d3isqskvgxfv552ewapjkdxmvq/node_modules/@nestjs/core/nest-application-context.js:234:13)
      at async Proxy.init (node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_re_d3isqskvgxfv552ewapjkdxmvq/node_modules/@nestjs/core/nest-application.js:100:9)
      at async Object.<anonymous> (src/external-accounts/external-accounts.resolver.e2e.ts:61:5)

Steps to Reproduce the Bug or Issue

Run e2e tests

Expected behavior

e2e to compile the app fine like production

Screenshots or Videos

Screenshot 2024-12-16 at 11 34 00 AM
Screenshot 2024-12-16 at 11 34 14 AM
Screenshot 2024-12-16 at 11 34 32 AM

Platform

  • OS: [macOS]
  • NodeJS: [20.18.0]
  • @graphql-yoga/* version(s): [5.10.6]
  • "@graphql-yoga/nestjs-federation": ["3.7.0"]

Additional context

No response

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