When using TypeScript with "module": "es2015", the compiler gives the following error:
index.ts(1,30): error TS2307: Cannot find module 'apollo-server-express'.
Here is the content of the index.ts:
import {graphqlExpress} from 'apollo-server-express'
typescript: 2.6.1apollo-server-express: 1.2.0graphql: 0.11.7Any idea why this is happening?
The solution was to set "moduleResolution": "node" at tsconfig.json
Most helpful comment
The solution was to set
"moduleResolution": "node"attsconfig.json