Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sgehrman opened this issue Jun 20, 2019 · 2 comments

Comments

@sgehrman
Copy link

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

@angelol
Copy link

angelol commented Jul 23, 2019

@sgehrman Have a look at our branch: https://github.com/rawrat/eosjs-ecc-priveos

We have replaced browserify-aes with something more secure and it no longer contains bytebuffer.

@gnollio
Copy link

gnollio commented Aug 16, 2019

I'm having the same issue. Thanks for the alternative @angelol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants