apollographql / apollo-link

:link: Interface for fetching and modifying control flow of GraphQL requests
https://www.apollographql.com/docs/link/
MIT License
1.44k stars 344 forks source link

Help Wanted - Project won't compile #702

Open danilohgds opened 6 years ago

danilohgds commented 6 years ago

Expected Behavior Project compiles successfully

Actual Behavior When invoking the angular build, I get the following warnings :

ERROR in C:/Projects/my-project/node_modules/@types/zen-observable/index.d.ts (32,14): Duplicate identifier 'Subscriber'.
ERROR in C:/Projects/my-project/node_modules/apollo-link/node_modules/@types/zen-observable/index.d.ts (8,9): All declarations of 'observable' must have identical modifiers.
ERROR in C:/Projects/my-project/node_modules/apollo-link/node_modules/@types/zen-observable/index.d.ts (31,14): Duplicate identifier 'Subscriber'.
ERROR in C:/Projects/my-project/node_modules/@types/graphql/utilities/introspectionQuery.d.ts (96,13): Type alias 'IntrospectionTypeRef' circularly references itself.
ERROR in C:/Projects/my-project/node_modules/apollo-link/lib/types.d.ts (2,8): Module '"C:/Projects/my-project/node_modules/apollo-link/node_modules/@types/zen-observable/index"' has no default export.
ERROR in C:/Projects/my-project/node_modules/apollo-link/lib/link.d.ts (2,8): Module '"C:/Projects/my-project/node_modules/apollo-link/node_modules/@types/zen-observable/index"' has no default export.
ERROR in C:/Projects/my-project/node_modules/apollo-link/lib/linkUtils.d.ts (2,8): Module '"C:/Projects/my-project/node_modules/apollo-link/node_modules/@types/zen-observable/index"' has no default export.
ERROR in C:/Projects/my-project/node_modules/apollo-link/lib/index.d.ts (4,8): Module '"C:/Projects/my-project/node_modules/apollo-link/node_modules/@types/zen-observable/index"' has no default export.
ERROR in C:/Projects/my-project/node_modules/apollo-client/ApolloClient.d.ts (108,27): Generic type 'Query<TVariables>' requires 1 type argument(s).
ERROR in C:/Projects/my-project/node_modules/apollo-client/ApolloClient.d.ts (120,30): Generic type 'Fragment<TVariables>' requires 1 type argument(s).
ERROR in C:/Projects/my-project/node_modules/apollo-client/ApolloClient.d.ts (126,25): Generic type 'WriteQueryOptions<TData, TVariables>' requires 2 type argument(s).
ERROR in C:/Projects/my-project/node_modules/apollo-client/ApolloClient.d.ts (138,28): Generic type 'WriteFragmentOptions<TData, TVariables>' requires 2 type argument(s).
ERROR in C:/Projects/my-project/node_modules/apollo-client/ApolloClient.d.ts (149,24): Generic type 'WriteDataOptions<TData>' requires 1 type argument(s).
ERROR in C:/Projects/my-project/src/app/core/apollo/introspection-query.graphql.ts (1,41): Cannot find module 'apollo-client/data/fragmentMatcher'.

A simple reproduction I am working on a new project to reproduce it, I think its the combination of dependencies below:

"apollo-angular": "^1.0.1",
"apollo-angular-link-http": "^1.0.0",
"apollo-angular-link-http-common": "^1.0.0",
"apollo-cache-inmemory": "^1.2.5",
"apollo-client": "^2.0.0",
"apollo-link": "^1.2.0",
"apollo-link-context": "1.0.8",
"apollo-link-error": "1.0.9",
"apollo-link-http": "1.5.4",
"rxjs": "5.4.2",
"typescript": "^2.3.4"

Issue Labels

capjamesg commented 6 years ago

Hello! I was looking for a resolution and I've experienced a similar error before. In regards to the " All declarations of 'observable' must have identical modifiers." error, this SO post may be of help: https://stackoverflow.com/questions/50639530/error-ts2687-all-declarations-of-observable-must-have-identical-modifiers