replicate-javascript icon indicating copy to clipboard operation
replicate-javascript copied to clipboard

Fix or explain use of modules with TypeScript

Open mattt opened this issue 7 months ago • 1 comments

In https://github.com/replicate/replicate-javascript/issues/161#issuecomment-1816333059, a user reported the following error:

TypeError: replicate_1.default is not a constructor

A solution was to add "esModuleInterop": true to the project's tsconfig.json file.

We should either make this step unnecessary, or barring that, document this workaround.

mattt avatar Nov 17 '23 12:11 mattt