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

Bug: node-fetch, request is not a function #173

Closed
hzz780 opened this issue Jul 3, 2024 · 0 comments · May be fixed by #174
Closed

Bug: node-fetch, request is not a function #173

hzz780 opened this issue Jul 3, 2024 · 0 comments · May be fixed by #174
Assignees
Labels
bug Something isn't working

Comments

@hzz780
Copy link
Contributor

hzz780 commented Jul 3, 2024

Description

nodejs.TypeError: request is not a function
    at HttpProvider.requestSendByFetch (/opt/workspace/aelf-block-api/node_modules/aelf-sdk/dist/aelf.cjs.js:41995:14)
    at HttpProvider.sendAsyncByFetch (/opt/workspace/aelf-block-api/node_modules/aelf-sdk/dist/aelf.cjs.js:42015:33)
    at HttpProvider.sendAsync (/opt/workspace/aelf-block-api/node_modules/aelf-sdk/dist/aelf.cjs.js:42103:32)
    at RequestManager.sendAsync (/opt/workspace/aelf-block-api/node_modules/aelf-sdk/dist/aelf.cjs.js:41875:28)
    at ChainMethod.run (/opt/workspace/aelf-block-api/node_modules/aelf-sdk/dist/aelf.cjs.js:40028:34)

Steps To Reproduce

const aelf = new AElf(new AElf.providers.HttpProvider('https://aelf-public-node.aelf.io', 8000, {}, requestOptions));

async function main() {
  const status = await aelf.chain.getChainStatus();
  console.log('status: ', status);
}
main();

Current Behavior

Expected Behavior

  • getChainStatus is ok

Environment

  • Node: v20.9.0
@hzz780 hzz780 added the bug Something isn't working label Jul 3, 2024
@hzz780 hzz780 self-assigned this Jul 3, 2024
@hzz780 hzz780 closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant