Ts-jest: imported package to be 'undefined'

Created on 4 Sep 2018  路  2Comments  路  Source: kulshekhar/ts-jest

Issue :

In 23.x version when I load the package by import syntax, it will be undefined.

e.g.

import Vue from 'vue';
// `Vue` to be `undefined`

But this is not occurred in 22.4.3.

Expected behavior :

Output from debug log :

# content of debug.txt :

Minimal repo :

Most helpful comment

fixed by esModuleInterop: true in tsconfig.json

Thanks!

All 2 comments

@tanakaworld this is most likely because you're missing the esModuleInterop: true in your tsconfig.json. See https://github.com/kulshekhar/ts-jest/wiki/Troubleshooting#commonjs-compatibility.

You can also try the latest beta if you feel like it (see #697).

Re-open in case that doesn't fix your issue.

fixed by esModuleInterop: true in tsconfig.json

Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artola picture artola  路  3Comments

jbreckmckye picture jbreckmckye  路  3Comments

GeeWee picture GeeWee  路  4Comments

bruk1977 picture bruk1977  路  3Comments

Slessi picture Slessi  路  3Comments