-
| 
         I am trying to run the "getting started" script on node.js but I get the following error when running the line: Could you indicate me what I may be doing wrong? 
 /home/ildefons/agentjs/node_modules/@dfinity/agent/lib/cjs/agent/http/index.js:58 TypeError: Cannot read properties of undefined (reading 'bind')  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| 
         I missed this notification - I'm sure you found the answer elsewhere. For future visitors: if fetch is available in your  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 }); | 
  
Beta Was this translation helpful? Give feedback.
I missed this notification - I'm sure you found the answer elsewhere.
For future visitors: if fetch is available in your
nodejsruntime,Otherwise, I suggest using the package isomorphic-fetch