Skip to content

Package subpath './lib/adapters/http' is not defined by "exports" #5264

Closed

Description

@WillianAgostini

Describe the bug

Module http adapter is not beind exported, so I cannot force axios to use the http adapter instead of xhr

To Reproduce

const axios =  require('axios');
const url = 'https://catfact.ninja/fact';
axios.get(url, {
  adapter: require('axios/lib/adapters/http'),
}).then(console.log).catch(console.log);

or

const instance = axios.create({
  adapter: require('axios/lib/adapters/http'),
})

It works using [email protected]

Expected behavior

Use HTTP adapter

Axios Version

1.1.3 and 1.2.0-alpha.1

Adapter Version

HTTP

Browser

No response

Browser Version

No response

Node.js Version

19.0.0

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

Activity

  1. WillianAgostini commented on Nov 13, 2022

    @WillianAgostini
    ContributorAuthor
  2. moazzamk commented on Nov 30, 2022

    @moazzamk

    When will this be available on npmjs (and which version)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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