eosjs-ecc icon indicating copy to clipboard operation
eosjs-ecc copied to clipboard

Remove import of old bytebuffer. Can't build a library that includes eosjs-ecc

Open sgehrman opened this issue 5 years ago • 2 comments

I'm trying to build an NPM package that includes eosjs-ecc. When I build it I get this:

WARNING in ./node_modules/bytebuffer/dist/bytebuffer-node.js Module not found: Error: Can't resolve 'memcpy' in '/home/steve/Documents/GitHub/aikon/ore-js/node_modules/bytebuffer/dist' @ ./node_modules/bytebuffer/dist/bytebuffer-node.js @ ./node_modules/eosjs-ecc/lib/aes.js @ ./node_modules/eosjs-ecc/lib/api_common.js @ ./node_modules/eosjs-ecc/lib/index.js @ ./src/verifier.js @ ./src/index.js

When I try and run a project that includes this library it stops and just gives this error:

(node:17758) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

eosjs-ecc imports browserify-aes which imports byteBuffer

─┬ [email protected] │ ├── [email protected] │ ├─┬ [email protected] │ │ ├── [email protected] │ │ ├─┬ [email protected] │ │ │ ├── [email protected] deduped │ │ │ └── [email protected] deduped │ │ ├── [email protected] deduped │ │ ├─┬ [email protected] │ │ │ ├── [email protected] deduped │ │ │ └── [email protected] deduped │ │ ├── [email protected] deduped │ │ └── [email protected] deduped │ ├─┬ [email protected] │ │ └─┬ [email protected] │ │ └── [email protected] deduped │ ├─┬ [email protected] │ │ └── [email protected]

Is this something you could fix in your library? Get rid or replace browserify-aes?

Thanks

sgehrman avatar Jun 20 '19 19:06 sgehrman