Skip to content

Axios 1.12.0 - typescript build issues #7016

@JimmyBjorklund

Description

@JimmyBjorklund

Describe the bug

After upgrading to latest axios version (1.12.0) from (1.11.0) i get this error:

node_modules/axios/index.d.ts:359:28 - error TS2552: Cannot find name 'RequestInfo'. Did you mean 'RequestInit'?

359 Request?: new (input: (RequestInfo | URL), init?: RequestInit) => Request;
~~~~~~~~~~~

node_modules/axios/index.d.ts:360:29 - error TS2304: Cannot find name 'BodyInit'.

360 Response?: new (body?: (BodyInit | null), init?: ResponseInit) => Response;

To Reproduce

add library to a node project using typescript and run
tsc

Code snippet

Expected behavior

Compile with out warning

Axios Version

1.12.0

Adapter Version

No response

Browser

None (node)

Browser Version

N/A

Node.js Version

v22.14.0

OS

Linux 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Additional Library Versions

Additional context/Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions