Skip to content

Error running GettingStarted script #515

Closed Answered by krpeacock
ildefons asked this question in General
Discussion options

You must be logged in to vote

I missed this notification - I'm sure you found the answer elsewhere.

For future visitors: if fetch is available in your nodejs runtime,

const agent = new actor.HttpAgent({ host: "https://ic0.app", fetch: global.fetch });

Otherwise, I suggest using the package isomorphic-fetch

import fetch from 'isomorphic-fetch'
const agent = new actor.HttpAgent({ host: "https://ic0.app", fetch });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by krpeacock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants