Hello, I was trying to use ipfs-core in my Javascript code and when I try running it I get:
TypeError: Class extends value undefined is not a constructor or null
Here is the code I have tried:
At the top of the file
const IPFS = require('ipfs-core');
Then
const ipfs = await IPFS.create();
const { cid } = await ipfs.add('Hello world');
const hashString = cid;
The full error is given as:
$ node index.js
H:\Projects\muelehe\node_modules\timeout-abort-controller\index.js:8
class TimeoutController extends AbortController {
^
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (H:\Projects\muelehe\node_modules\timeout-abort-controller\index.js:8:33)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (H:\Projects\muelehe\node_modules\ipfs-core-utils\cjs\src\with-timeout-option.js:5:30)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)