DEV Community

loading...
Cover image for Is Axios Isn't Trust Worthy Anymore πŸ˜’

Is Axios Isn't Trust Worthy Anymore πŸ˜’

heyazhar profile image Azhar ・1 min read

Hello DEVs, currently I'm working on a MERN Stack project and using Axios to fetch the backend API. However, from last 3 days I'm facing installation and usability issue with Axios. I checked NPM Registery and got myself correct.
Alt Text
As you can see on the above image, Axios is failing on build.
Now, being a huge community and getting so much of dependants this irresponsibility is not expected.
I've started using fetch() instead. Let me know if you have any strong and stable recommendation.
Happy CodingπŸ₯‚

Discussion (10)

pic
Editor guide
Collapse
shriji profile image
Shriji

Build failing doesn't mean your project's fetch code is correct. Axios seems to work for me.

Collapse
heyazhar profile image
Azhar Author

Leave fetch aside, axios isn't even getting installed on any device or project

Collapse
foresthoffman profile image
Forest Hoffman

Hi Azhar,

This comment, and post, is not constructive. Please review the community code of conduct before posting, in the future. Generally speaking, in the open source developer community it is a pretty big no-no to dump on an open source project on social media (dev.to counts). It would be better to look at the project's repository (there should be a link on the package's NPM page). From there you can view existing issues that may shed light on what is going wrong.

One comment in this discussion indicates that there's some more debugging to be done, on your part. In the case that you've found a bug with that package, you should make an issue for it, and/or attempt to fix it! :)

Cheers!

Thread Thread
heyazhar profile image
Azhar Author

I got point very clearly.
Thank you so much for correcting me. πŸ™ ❀️

Collapse
shriji profile image
Shriji

Learn to install them properly.

Thread Thread
heyazhar profile image
Azhar Author

Brother, I'm using Axios for the last 1.5 years

Thread Thread
shriji profile image
Shriji

Your code is wrong, and don't blame Axios.

Collapse
scgrk profile image
Stephen Gerkin

The current build fail is from 3 days ago (Jan 17). The current release (that you install via npm) is Jan 4. The build failing has nothing to do with whatever problem you're having.

Collapse
t7yang profile image
t7yang • Edited

There are many alternative for http request library like got, ky, elixor, ...
If your code running on web only, then fetch is absolutely fine

Collapse
heyazhar profile image
Azhar Author

Yes, I also think so