Js-libp2p: npm install fails

Hi, I just cloned the js-libp2p project and run npm install. Here’s the error

libp2p@0.31.5 prepare /mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p
aegir build --no-bundle

ReferenceError: TextDecoder is not defined
at Object. (/mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p/node_modules/multibase/src/util.js:3:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p/node_modules/multibase/src/base.js:3:24)
at Module._compile (internal/modules/cjs/loader.js:778:30)
/mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p/node_modules/aegir/src/config/user.js:141
throw new Error(‘Error finding your config file.’)
^

Error: Error finding your config file.
at config (/mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p/node_modules/aegir/src/config/user.js:141:11)
at Object. (/mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p/node_modules/aegir/src/config/user.js:153:15)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/mnt/c309176e-9dab-4ff0-b5c4-622d255fff00/prj/js-libp2p/node_modules/aegir/cli.js:19:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! libp2p@0.31.5 prepare: aegir build --no-bundle
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libp2p@0.31.5 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any ideas?

Hey @wLRy

What node version you have? We are only compatible with Node14 or newer, given that it is the currently Active LTS and allows us to use new APIs that we could not use before

Indeed, I was with node v10.19.0

I installed v14.17.0 by running nvm install --lts and the build succeeds now. Thanks!