Skip to content

Latest commit

 

History

History
32 lines (18 loc) · 1.16 KB

TROUBLESHOOTING.md

File metadata and controls

32 lines (18 loc) · 1.16 KB

Troubleshooting

Problem

I'm getting compilation errors caused by the tree-shaking of lodash.

Possible Fix

Follow these steps:

  1. Update your tsconfig.json to have allowSyntheticDefaultImports: true property in compilerOptions. This property allows users to import CommonJS modules as default imports.

    • If you have compilation error like TypeError: find_1.default is not a function when running tests you might need to add esModuleInterop: true to your compilerOptions. Or you can try Solution #2 from this article.
  2. After updates in tsconfig.json change imports of lodash to such way in all files:

    import forEach from “lodash/forEach”;

Additional articles about tsconfig compilerOptions:

Problem:

Not sure which version of node should I use.

Possible Fix:

It is recommended to use version which is on CircleCI builds which is currently 16.18.0