js-sha3 package
There's a defect reported for js-sha3 (https://github.com/emn178/js-sha3/pull/23) which can be a show stopper for some sdk users. The maintenance circle on js-sha3 seems slow. We can perhaps look for alternative libraries (e.g. https://www.npmjs.com/package/sha3) if it cannot be rectified in a timely manner
@fboucquez
A note for anyone hitting this, I had this issue when running tests in jest:
input is invalid type
at Keccak.Object.<anonymous>.Keccak.update (node_modules/js-sha3/src/sha3.js:200:19)
at Object.<anonymous>.exports.generateNamespaceId (node_modules/symbol-sdk/src/core/format/Utilities.ts:130:10)
But it works outside of Jest. It is not a solution but is a workaround if you need one.
This is my workaround for the problem.
npm install https://github.com/Propine/js-sha3.git
I applied the solution shared by @44uk , and it worked well. I just needed to delete the node_modules folder and yarn install again.
I'm using jest for testing with TypeScript
How's it going?
My workaround is seems to be better npm install Propine/js-sha3#5ae72e8b than previous.