taquito icon indicating copy to clipboard operation
taquito copied to clipboard

Update to axios 1.x

Open avysel opened this issue 2 years ago • 1 comments

Hello

I’ve updated a React app using Taquito. I was using Taquito 13.x, I’ve updated to 16.x

My project also uses axios. But I was forced to downgrade my axios from 1.x to 0.27.2 because of your new axios-fetch-adapter that uses axios 0.27.2.

Using axios 1.x in an app with Taquito results in this error at build time:

./node_modules/@taquito/axios-fetch-adapter/index.js
Attempted import error: 'isFormData' is not exported from 'axios/lib/utils'.

Because axios 0.x exports like this:

module.exports = {
  isArray: isArray,
…
}

But axios 1.x exports like this:

export default {
  isArray,
…
}

Your code of axios-fetch-adapter fits only with axios 0.x. And that forced me to downgrade a part of my app that uses axios too.

Could you consider using a recent axios version?

avysel avatar May 02 '23 16:05 avysel

This is also making trouble with SIWT. I think an upgrade here would be a good solution instead of force pinning the outdated version at SIWT

jdsika avatar Jun 12 '23 08:06 jdsika

@avysel & @jdsika We've changed from axios to fetch in taquito v17.5.0, can you confirm the issue is resolved?

hui-an-yang avatar May 13 '24 20:05 hui-an-yang

@hui-an-yang yes, to me it's ok, thanks.

avysel avatar May 13 '24 21:05 avysel

I forwarded the request but I guess it's fine then :)

jdsika avatar May 14 '24 06:05 jdsika