Apollo-server: Cannot find module with ES2015 modules config

Created on 13 Nov 2017  路  1Comment  路  Source: apollographql/apollo-server

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.1
  • apollo-server-express: 1.2.0
  • graphql: 0.11.7

Any idea why this is happening?

Most helpful comment

The solution was to set "moduleResolution": "node" at tsconfig.json

>All comments

The solution was to set "moduleResolution": "node" at tsconfig.json

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leinue picture leinue  路  3Comments

dobesv picture dobesv  路  3Comments

jpcbarros picture jpcbarros  路  3Comments

stevezau picture stevezau  路  3Comments

attdona picture attdona  路  3Comments