Intercepts failed axios requests and retries them automatically. Current version 4.5.0, actively maintained with releases on demand. Supports exponential backoff, custom retry conditions, and per-request config. Works with axios 0.x and 1.x. Ships TypeScript types. Differentiates from similar libraries (like axios-retry-plus) by being lightweight and focused on simple, flexible retry logic without external dependencies.
npm install axios-retryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up axios-retry with exponential backoff on a custom axios instance, including per-request override and error handling.
Use default import.
Provide a function like (retryCount) => retryCount * 1000.
Set shouldResetTimeout: true in options.
To retry all 5xx errors, use a custom retryCondition that always returns true.
Add .default or use import/import() syntax.
const axiosRetry = require('axios-retry').default;Use dynamic import: import('axios-retry') or enable ESM in your project.Use a function like (retryCount) => retryCount * 1000
Set shouldResetTimeout: true in axios-retry options