Replies: 3 comments
-
Can you include a console.log in your script running on AWS and include everything required to call it, such as the contract address, the list of tokens, etc. This is often a case of the parameters on the server not matching what you expect them to. |
Beta Was this translation helpful? Give feedback.
-
(moving to discussions for now, as there isn't currently enough detail to debug) |
Beta Was this translation helpful? Give feedback.
-
I think this is linked with fetch not being available and the fact that somehow lambda is trying to access ethersjs as if it were a browser. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Ethers Version
5.6.9
Search Terms
No response
Describe the Problem
If I zip the handler.js and the node_modules folder it works, if I bundle with webpack and only zip the bundled file gives me a call exception error.
This is my webpack.config.js file (webpack 5.73):
const path = require("path");
module.exports = {
entry: path.resolve(__dirname, "index.js"),
output: {
path: path.resolve(__dirname, "dist"),
filename: "index.js",
libraryTarget: "commonjs2",
},
target: "node",
devtool: "inline-source-map",
};
Thanks in advance!
Code Snippet
Contract ABI
Errors
Environment
node.js (v12 or newer)
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions