You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to run a terminal based app using version 0.17.2, I get this error:
/@avalabs/avalanche-wallet-sdk/dist/index.js:1596
const response = yield fetch(input, Object.assign(Object.assign({}, options), { signal: controller.signal }));
^
ReferenceError: fetch is not defined
at HttpClient.<anonymous> (/@avalabs/avalanche-wallet-sdk/dist/index.js:1596:30)
at Generator.next (<anonymous>)
at /@avalabs/avalanche-wallet-sdk/dist/index.js:186:71
at new Promise (<anonymous>)
at __awaiter (/@avalabs/avalanche-wallet-sdk/dist/index.js:182:12)
at HttpClient.fetchWithTimeout (/@avalabs/avalanche-wallet-sdk/dist/index.js:1592:16)
at HttpClient.post (/@avalabs/avalanche-wallet-sdk/dist/index.js:1576:41)
at /@avalabs/avalanche-wallet-sdk/dist/index.js:5450:46
at Generator.next (<anonymous>)
at /@avalabs/avalanche-wallet-sdk/dist/index.js:186:71
at new Promise (<anonymous>)
at __awaiter (/@avalabs/avalanche-wallet-sdk/dist/index.js:182:12)
at getAddressChains (/@avalabs/avalanche-wallet-sdk/dist/index.js:5441:12)
at HdScanner.<anonymous> (/@avalabs/avalanche-wallet-sdk/dist/index.js:7347:36)
at Generator.next (<anonymous>)
at fulfilled (/@avalabs/avalanche-wallet-sdk/dist/index.js:183:58)
A working solution is to install the CJS module via:
npm install node-fetch@2
Then edit @avalabs/avalanche-wallet-sdk/dist/index.js and add
const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
at the top of the file.
Perhaps node-fetch should be included in the node only version?
The text was updated successfully, but these errors were encountered:
When attempting to run a terminal based app using version 0.17.2, I get this error:
A working solution is to install the CJS module via:
npm install node-fetch@2
Then edit
@avalabs/avalanche-wallet-sdk/dist/index.js
and addconst fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args));
at the top of the file.
Perhaps node-fetch should be included in the node only version?
The text was updated successfully, but these errors were encountered: