-
Notifications
You must be signed in to change notification settings - Fork 797
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
Comments
Try my fork, it has better support for different module systems. |
How do we install your fork rather than the main package? |
If you use npm, you can use I also have some example projects: |
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". |
@jburich What is the problem with my fork? Did you see the example projects? |
With the fork I get an error that it can't find the crypto module. |
@jburich Please file an issue at https://github.com/ysangkok/forge/issues . Mind SSCCE. |
@ysangkok Plzz, show me example with react-native!! |
@jburich were you able to get node-forge work with react native? |
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. |
Hopefully will be addressed in a new release now that #456 has been merged. |
0.7.0 was released with a new commonjs design and build system which should fix this issue. |
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?
The text was updated successfully, but these errors were encountered: