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

running master error -> installSubscriptionHandlers #1426

Open
idkjs opened this issue Jun 11, 2020 · 4 comments
Open

running master error -> installSubscriptionHandlers #1426

idkjs opened this issue Jun 11, 2020 · 4 comments
Assignees
Labels

Comments

@idkjs
Copy link

idkjs commented Jun 11, 2020

After cloning and installing the server, then running yarn start you get an error saying

Property 'installSubscriptionHandlers' does not exist on type 'ApolloServer'.

~/Downloads/WhatsMaster/WhatsApp-Clone-Server master*
❯ yarn start
yarn run v1.22.4
$ yarn codegen
$ graphql-codegen
  ✔ Parse configuration
  ✔ Generate outputs
$ ts-node index.ts

/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:434
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
index.ts:13:8 - error TS2339: Property 'installSubscriptionHandlers' does not exist on type 'ApolloServer'.

13 server.installSubscriptionHandlers(httpServer);
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    at createTSError (/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:434:12)
    at reportTSError (/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:438:19)
    at getOutput (/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:578:36)
    at Object.compile (/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:775:32)
    at Module.m._compile (/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:858:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/mandalarian/Downloads/WhatsMaster/WhatsApp-Clone-Server/node_modules/.pnpm/ts-node@8.10.1_typescript@3.9.3/node_modules/ts-node/src/index.ts:861:12)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there a working branch or a way to resolve this error that you are aware of?

Thank you.

@dotansimha
Copy link
Collaborator

Hi @idkjs !
Which version of apollo-server do you have installed?

@dotansimha
Copy link
Collaborator

@Urigo can you take a look? maybe something has changed in apollo-server?

@idkjs
Copy link
Author

idkjs commented Jun 11, 2020

using the version in package.json, 2.13.1

@bastianhilton
Copy link

i'm following a tutorial and had this issue, but its version was at 2.19.0 for apollo-server-express which appears to be a separate npm module from Apollo-server. Once i installed the apollo-server-express plugin at the version 2.19.0 the issue went away, hope this helps.

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

No branches or pull requests

4 participants