Open rolandjitsu opened 6 years ago
Try disabling allowSyntheticDefaultImports
in your tsconfig.json
if you have it enabled
This was fixed in ts-jest
https://github.com/kulshekhar/ts-jest/issues/258#issuecomment-410236002.
I tried to get it upgraded locally in react-scripts-ts but failed, maybe I'm missing something as I'm pretty new to the whole ecosystem.
Is this a bug report?
Yes.
Can you also reproduce the problem with npm 4.x?
Yes.
Which terms did you search for in User Guide?
Unexpected token, Unexpected token import, dynamic import
Environment
npm ls react-scripts-ts
(if you haven’t ejected): 2.16.0node -v
: 8.11.2npm -v
: 5.6.0yarn --version
(if you use Yarn): 1.7.0npm ls react-scripts-ts
(if you haven’t ejected):Then, specify:
Steps to Reproduce
Go to cra-workspaces#dynamic-import:
yarn install
from rootyarn test
NOTE: Use
yarn start
to run the app and confirm it actually works.Expected Behavior
Tests would pass without errors.
Actual Behavior
Tests are failing with:
Reproducible Demo
See cra-workspaces#dynamic-import and use instructions above to reproduce.