Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support newer versions of axios? #14

Closed
papandreou opened this issue Jul 27, 2022 · 3 comments
Closed

Support newer versions of axios? #14

papandreou opened this issue Jul 27, 2022 · 3 comments

Comments

@papandreou
Copy link

Hi, I'm using axios-ntlm via the soap module. I noticed that I end up with an older version of axios (latest is 0.27.2, I'm getting 0.21.4):


$ npm ls axios
[...]
└─┬ soap@0.45.0
  ├─┬ axios-ntlm@1.3.0
  │ └── axios@0.21.4 deduped
  └── axios@0.21.4

(npm version 8.12.1, node version 18.5.0)

soap has a peer dep on axios@>=0.21.1, but because of axios-ntlm's peer dep on axios@^0.21.3, npm installs 0.21.4. It's because ^ only matches 0.21.3 and 0.21.4 due to the pre-1.0.0 version number:

Screenshot 2022-07-27 at 16 28 33

So I guess what I'm asking is: Does axios-ntlm support newer versions of axios, and if so, could we make the peer dep more liberal so that users can use newer version without adding an override to package.json? 🤗

@gustavogialim
Copy link

@papandreou nice point, also I was getting an error with the current axios version used by axios-ntlm.

The error:

TypeError: Cannot read properties of undefined (reading 'create')
    at new HttpClient (/app/node_modules/soap/src/http.ts:42:52)
    at new Client (/app/node_modules/soap/src/client.ts:77:45)
    at /app/node_modules/soap/src/soap.ts:84:27
    at WSDL.callback (/app/node_modules/soap/src/soap.ts:37:9)
    at /app/node_modules/soap/src/wsdl/index.ts:149:16
    at WSDL._processNextInclude (/app/node_modules/soap/src/wsdl/index.ts:1189:14)
    at WSDL.processIncludes (/app/node_modules/soap/src/wsdl/index.ts:173:10)
    at /app/node_modules/soap/src/wsdl/index.ts:101:12
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

My temporary fix to it is override the axios version in the package.json:

"overrides": {
    "soap": {
      "axios-ntlm": {
        "axios": "^0.27.2"
      },
      "axios": "^0.27.2"
    }
  }

Would be great to review this question in this lib and fix it :)
If I get sometime some day I can try to open a Merge Request.

@papandreou
Copy link
Author

Ping @Catbuttes 🤗

@vision10
Copy link
Collaborator

axios is at latest 1.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants