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

TypeError: axios_1.default.post is not a function #56

Open
saltykovdg opened this issue Sep 3, 2024 · 3 comments
Open

TypeError: axios_1.default.post is not a function #56

saltykovdg opened this issue Sep 3, 2024 · 3 comments

Comments

@saltykovdg
Copy link

Hi, I've connected the ton client import { TonClient } from '@ton/ton';, but I'm getting an error every time when I'm communicating with a contract, is it a known issue?

my dependencies:

  "dependencies": {
    "@orbs-network/ton-access": "^2.3.3",
    "@reduxjs/toolkit": "^1.9.7",
    "@ton/core": "^0.57.0",
    "@ton/crypto": "^3.3.0",
    "@ton/ton": "^15.0.0",
    "@tonconnect/protocol": "^2.2.6",
    "@tonconnect/sdk": "^3.0.5",
    "@tonconnect/ui-react": "^2.0.9",
    "@twa-dev/sdk": "^7.8.0",
    "buffer": "^6.0.3",

Error:

2HttpApi.js:263 Uncaught (in promise) TypeError: axios_1.default.post is not a function
    at HttpApi.doCall (HttpApi.js:263:1)
    at HttpApi.callGetMethod (HttpApi.js:235:1)
    at TonClient.runMethod (TonClient.js:40:1)
    at TonClient.callGetMethod (TonClient.js:55:1)
    at Object.get (TonClient.js:372:1)
    at Counter.getCounter (useCounterContract.ts:12:1)
    at Proxy.<anonymous> (openContract.js:38:1)
    at getValue (useCounterContract.ts:49:1)
    at useCounterContract.ts:53:1
    at commitHookEffectListMount (react-dom.development.js:23189:1)
@saltykovdg
Copy link
Author

Workaround to fix an issue:
add into package.json

"dependencies": {
   ...
   "axios": "^0.28.1",
   ...
 },
 "resolutions": {
   "axios": "^0.28.1"
 },

@minhkhoi8888
Copy link

Does anyone know a solution to fix it?

@acdmft
Copy link

acdmft commented Oct 19, 2024

i moved my project from Webpack to Vite and the problem was resolved

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