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

Using version 2.2.0 results in an error when querying SCs #52

Open
damienen opened this issue Dec 14, 2023 · 10 comments
Open

Using version 2.2.0 results in an error when querying SCs #52

damienen opened this issue Dec 14, 2023 · 10 comments

Comments

@damienen
Copy link

Seems like because of the update of axios to a new version, the tests (internal tests from the library) that use jest return an error when being used in a project:

TypeError: axios_1.default.post is not a function

A related post: facebook/create-react-app#12823

@andreibancioiu
Copy link
Contributor

Thank you 🙏

Also reproduced here: https://t.me/MultiversXDevelopers/121486

@andreibancioiu
Copy link
Contributor

andreibancioiu commented Dec 15, 2023

Issue manifests when a newer @multiversx/sdk-network-providers is used in conjunction with older versions of@multiversx/sdk-dapp, which referenced an older axios (before v1).

Normally, the issue should be resolved by:

Further testing is necessary to confirm the fix, though.

@andreibancioiu
Copy link
Contributor

andreibancioiu commented Dec 15, 2023

Update: multiversx/mx-sdk-dapp#992 should normally fix this.

@CiprianDraghici
Copy link

CiprianDraghici commented Dec 18, 2023

@damienen could you check sdk-dapp@2.25.2 ? Let me know if your error still persists.

cc @andreibancioiu

@damienen
Copy link
Author

damienen commented Dec 19, 2023

Yes, I can confirm error persists when using these packages:
"@multiversx/sdk-core": "12.17.0",
"@multiversx/sdk-dapp": "2.25.2",
"@multiversx/sdk-native-auth-client": "1.0.6",
"@multiversx/sdk-network-providers": "2.2.0",

@andreibancioiu
Copy link
Contributor

Additional step to fix this is attempted here: #53.

@andreibancioiu
Copy link
Contributor

Also reported here: https://t.me/MultiversXDevelopers/122488

@andreibancioiu
Copy link
Contributor

Possibly related to: https://stackoverflow.com/questions/76888080/react-app-throwing-axios-1-default-post-is-not-a-function-error

@icegriffinguru
Copy link

Possibly related to: https://stackoverflow.com/questions/76888080/react-app-throwing-axios-1-default-post-is-not-a-function-error

This resolved the issue. 🙏

@andreibancioiu
Copy link
Contributor

Related: multiversx/mx-sdk-dapp#999.

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

4 participants