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

New Axios-based cookie support has side-effects because of axios-cookiejar-support #254

Open
dsebastien opened this issue Feb 10, 2021 · 2 comments

Comments

@dsebastien
Copy link

I'm cross-posting this issue here just to let you know that the new usage of axios-cookiejar-support has side effects on unrelated code. As I've described here (auth0/node-jwks-rsa#215), I'm using node-jwks-rsa, which also uses Axios as client. Unfortunately, since nano includes axios-cookiejar-support, it seems that the way node-jwks-rsa uses Axios does not work anymore.

I imagine that they could change the way they use Axios, but it's rather surprising to see such side-effects. Note that it's not an issue with nano per se, but I thought it might be interesting to make it appear here too, in case others stumble upon such problems.

Expected Behavior

No side-effects with Axios.

Current Behavior

Axios breaks when used in certain ways because of the presence of axios-cookiejar-support.

Possible Solution

Fix of axios-cookiejar-support & upgrade of nano (maybe it should also be a peer dependency?)

Steps to Reproduce (for bugs)

  • Add nano to a project
  • Import Axios using import {get} from 'axios' and try to make a simple request

Your Environment

  • Version used: 9.0.3
  • Browser Name and version: N/A
  • Operating System and version (desktop or mobile): N/A
  • Link to your project: N/A
@mlegenhausen
Copy link

Same problem. Please don't monkey patch dependencies!

@gallak87
Copy link

Same problem here, an upstream dependency fabric-common that uses nano, ends up breaking some of our nestjs downstream deps that require httpService (which uses axios)

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