eosjs icon indicating copy to clipboard operation
eosjs copied to clipboard

Unresolved module bug in react-native project

Open kination opened this issue 8 years ago • 8 comments

Version of EOSJS eosjs@beta

Describe the bug It seems it only happens in react-native project, for now. When import the module and initiate, project shows error as:

error: bundling failed: Error: Unable to resolve module `assert` from `/path/to/project/node_modules/eosjs-ecc/lib/aes.js`: Module `assert` does not exist in the Haste module map

I'm not sure this is the problem of eosjs or issue in react-native. If somebody knows about this, please let me know.

To Reproduce Steps to reproduce the behavior:

  1. Apply eosjs module in react-native default project
  2. import module
  3. Run project

Expected behavior Works well

Smartphone (please complete the following information):

  • Device: Android emulator

kination avatar Oct 23 '18 10:10 kination

I have the same issue, anyone can help?!

yang24201 avatar Nov 01 '18 07:11 yang24201

@djKooks Have you solved the problem?

yang24201 avatar Nov 01 '18 07:11 yang24201

This is a known issue, eosjs-ecc does not support react-native.

jeffreyssmith2nd avatar Nov 01 '18 13:11 jeffreyssmith2nd

maybe you can choose it in react native. https://github.com/Game-X-Coin/eosjs-rn

jadertao avatar Nov 01 '18 16:11 jadertao

@yang24201 no...it seems known issue as in comment. @jeffreyssmith2nd Is there a plan for fix?

kination avatar Nov 02 '18 01:11 kination

maybe you can choose it in react native. https://github.com/Game-X-Coin/eosjs-rn

eosjs-rn also can not operate correctly

marcoLuo avatar Dec 25 '18 13:12 marcoLuo

try this https://github.com/mvayngrib/rn-nodeify.

shamtroon avatar Feb 27 '19 09:02 shamtroon

The current develop branch dropped eosjs-ecc and uses the elliptic library instead.

tbfleming avatar Sep 20 '19 20:09 tbfleming