Skip to content

TypeError: Cannot read property 'FormData' of undefined in WeChat Mini Program environment (v0.30.2) #7306

@volc-tos

Description

@volc-tos

Describe the bug

When using axios in a WeChat Mini Program environment, the application throws the following error on a specific page:

TypeError: Cannot read property 'FormData' of undefined

This happens during axios initialization when it tries to detect the FormData constructor.
Image

Image

To Reproduce

No response

Code snippet

Expected behavior

No response

Axios Version

0.30.2

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

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