ReferenceError: self is not defined

Hi all, I am running the server.js sample code for NodeJS and I get the following error:

/cert-blockchain/node_modules/@blockcerts/hashlink-verifier/lib/cjs/hashlink/crypto-browser.js:5
exports.default = (self.crypto || self.msCrypto);
                             ^

ReferenceError: self is not defined
    at Object.<anonymous> (/cert-blockchain/node_modules/@blockcerts/hashlink-verifier/lib/cjs/hashlink/crypto-browser.js:5:20)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/cert-blockchain/node_modules/@blockcerts/hashlink-verifier/lib/cjs/hashlink/codecs.js:35:42)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)

My NodeJS version is v16.15.0 and my cert-verifier-js version is 5.13.0.

The documentation indicates that it is possible to run cert-verifier-js from NodeJS

Can anyone help me?

Thanks

The code should be available from @blockcerts/cert-verifier-js/lib.
The build tests seem to be working so I haven’t noticed any issue, but please confirm if that works, the issue seems to be coming from a sub package.

I installed the dependencies on the @blockcerts/cert-verifier-js path using the npm install --legacy-peer-deps command and I get the same error.

I don’t know if this is the right thing to do because I am new to NodeJS. Please guide me about it.

I have tracked this issue here: Node build is broken · Issue #1380 · blockchain-certificates/cert-verifier-js · GitHub