JustinBeckwith / retry-axios

🦖 A super flexible interceptor for Axios that makes it easy to retry requests.
Apache License 2.0
490 stars 62 forks source link

Cannot find module 'retry-axios' or its corresponding type declarations #224

Closed markabrahams closed 1 year ago

markabrahams commented 1 year ago

Hi

In retry-axios version 3.1.0, the ES-style import: import * as rax from 'retry-axios'; fails to compile with Typescript compiler (v5.2.2) with default configuration with error: main.ts:1:22 - error TS2307: Cannot find module 'retry-axios' or its corresponding type declarations.

retry-axios version 3.0.0 compiles fine with the same import.

A require is also fine with version 3.1.0: const rax = require('retry-axios');

steakyukke commented 1 year ago

I think it is because 3.1.0 does not include retry-axios/build/src/index.d.ts.