Cannot find module 'apollo-server-plugin-base' or its corresponding type declarations
See original GitHub issueI’m using this library with graphql-yoga
and fastify
and I end up with having to install apollo-server-plugin-base
because I’m getting this type error:
import type { ApolloServerPlugin } from 'apollo-server-plugin-base';
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in node_modules/@graphql-hive/client/apollo.d.ts```
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Cannot find module 'apollo-server-core/dist ... - GitHub
When I attempt to compile my typescript code, I get the following series of ... node_modules/apollo-server-plugin-base/dist/index.d.ts:1:95 ...
Read more >npm - TypeScript import issues in apollo-server-express ...
The import type syntax used in apollo-server-core isn't supported by the version of typescript that you're using (v3.6).
Read more >apollo-server-plugin-base - npm
Start using apollo-server-plugin-base in your project by running `npm i ... indicating that this package has built-in type declarations.
Read more >Migrating to Apollo Server 4 - Apollo GraphQL Docs
In Apollo Server 3, the apollo-server-core package defines an ApolloServer "base" class, which each integration package ( apollo-server-express , apollo-server- ...
Read more >cannot find module or its corresponding type declarations
Add this tsconfig as the base config file in your tsconfig.json : ... Then doing F1 -> reload window. Or apparently by installing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dotansimha I think a seperate package is the best option here
Intermediate fix:
Create a
missing_apollo_types.d.ts
(name does not matter) file in your project with the following content: