Recently, I deployed Dapp on Aws S3 bucket. I used bignumber.js@^9.0.1 to compute the liquidity pool price properly and also to prevent the overflow. I used React to build this app, and thus I assume all the packages and relative libraries should be uploaded through packages.json. While it bignumber.js library worked well in localhost, it causes the invalid bignumber value error on Aws S3. Here is the error message I received from the server:
"""
error event: Error: invalid BigNumber value (argument="value", value="1000000000000000000", code=INVALID_ARGUMENT, version=bignumber/5.0.14)
at e.value (index.ts:205)
at e.value (index.ts:217)
at e.value (index.ts:221)
at Function.value (bignumber.ts:281)
at r.value (number.ts:21)
at array.ts:71
at Array.forEach (<anonymous>)
at q (array.ts:54)
at r.value (tuple.ts:23)
at e.value (abi-coder.ts:106)
"""
I assumed that it might happen if the bignumber.js version is deprecated to 5.0.14. Is it possible that a deprecated library dependency version installed while I used the upper version and recorded it in package.json? Please provide any advice on how to solve this issue. I have been struggling with this for days...
Here is the list of dependencies I used:
"dependencies": {
"@aws-cdk/aws-s3": "^1.9.0",
"@material-ui/core": "^4.11.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^0.21.1",
"bignumber.js": "^9.0.1",
"electron": "^11.2.0",
"googleapis": "39",
"material-ui": "^0.20.2",
"nw-react-slider": "^2.0.1",
"react": "^17.0.1",
"react-bootstrap": "^1.4.3",
"react-copy-to-clipboard": "^5.0.2",
"react-dom": "^17.0.1",
"react-google-charts": "^3.0.15",
"react-icons": "^4.1.0",
"react-minimal-pie-chart": "^8.1.0",
"react-motion": "^0.5.2",
"react-notifications": "^1.7.2",
"react-router-dom": "^5.2.0",
"react-script": "^2.0.5",
"react-scripts": "4.0.1",
"react-slider": "^1.1.2",
"reactstrap": "^8.8.1",
"styled-components": "^5.2.1",
"tabletop": "^1.6.3",
"web-vitals": "^0.2.4",
"web3": "^1.3.1"
},