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

module doesn't load in react-native #325

Closed
alinz opened this issue Nov 10, 2015 · 12 comments
Closed

module doesn't load in react-native #325

alinz opened this issue Nov 10, 2015 · 12 comments
Milestone

Comments

@alinz
Copy link

alinz commented Nov 10, 2015

Hello Your module doesn't load into react-native. i believe you are using dynamic require to load modules. Is there any way I can get it to work?

@alinz alinz changed the title your module doesn't load in react-native module doesn't load in react-native Nov 10, 2015
@ysangkok
Copy link

Try my fork, it has better support for different module systems.

@ErkanSensei
Copy link

How do we install your fork rather than the main package?

@ysangkok
Copy link

ysangkok commented Apr 23, 2016

@jburich
Copy link

jburich commented May 26, 2016

Has anybody found a work around for this? I have been trying for 2 days now to encrypt some data. An api sends me a modulus and exponent that I have to then use to encrypt data and send to a different service. On our website we use this library but I cannot get it to work with React Native at all. I've also tried the fork by @ysangkok with no luck. I've even explored alternative libraries like https://github.com/z-hao-wang/react-native-rsa and none of them work. react-native-rsa was the only one I could even get to run, all of the others cause my app to crash, but react-native-rsa does something (I can't figure out what) differently because the service can't decrypt. I know for sure this library works from node for me as I have mocha tests written that call the backend and my code works successfully, but then as soon as I run inside React Native I get an error that says: "SyntaxError ../node_modules/node-forge/js/forge.js: Deleting local variable in strict mode".

@ysangkok
Copy link

@jburich What is the problem with my fork? Did you see the example projects?

@jburich
Copy link

jburich commented May 26, 2016

With the fork I get an error that it can't find the crypto module.

@ysangkok
Copy link

ysangkok commented May 26, 2016

@jburich Please file an issue at https://github.com/ysangkok/forge/issues . Mind SSCCE.

@binhnq94
Copy link

binhnq94 commented Sep 2, 2016

@ysangkok Plzz, show me example with react-native!!

@ranjitpandit
Copy link

@jburich were you able to get node-forge work with react native?

@jburich
Copy link

jburich commented Sep 13, 2016

hmm, I did I got it working but I don't recall how its been so long. When I get into work today I'll take a look at the code and let you know.

@dlongley
Copy link
Member

Hopefully will be addressed in a new release now that #456 has been merged.

@davidlehn davidlehn added this to the v0.7.0 milestone Jan 12, 2017
@davidlehn
Copy link
Member

0.7.0 was released with a new commonjs design and build system which should fix this issue.

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

8 participants