Closed saravvij closed 4 years ago
Add "esModuleInterop": true
to your tsconfig.json and it should be good.
That works for me.
Fixed in the latest version of @nestjs/cli
(specifically in its dependency @nestjs/schematics
) and in the typescript-starter
I'm submitting a...
Current behavior
I was trying to setup nestjs with graphql, I followed the document from here - https://docs.nestjs.com/graphql/quick-start
$ npm i --save @nestjs/graphql graphql-tools graphql $ npm i --save apollo-server-express
The server restarts failed with the below
ts
error,I had to fix this error by adding the config
"esModuleInterop": true
intsconfig.json
file. It would be great if this can be added by default in nest cli scaffolding or mentioned in the nestjs/graphql document somewhere.Expected behavior
The ts error should not appear
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment