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

React Native compatibility #826

Open
tomasAlabes opened this issue Dec 22, 2021 · 2 comments
Open

React Native compatibility #826

tomasAlabes opened this issue Dec 22, 2021 · 2 comments

Comments

@tomasAlabes
Copy link

tomasAlabes commented Dec 22, 2021

Hi, I'm using the use-neo4j library to build an app that communicates with Neo4j Cloud AuraDB. Using React Native. While building for the app for it, this happens:

Android Bundling failed 4588ms
Unable to resolve module net from ~/Documents/ActiveProjects/connections/node_modules/neo4j-driver-bolt-connection/lib/channel/node/node-channel.js: net could not be found within the project or in these directories:
  node_modules

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  22 |  * limitations under the License.
  23 |  */
> 24 | var net_1 = __importDefault(require("net"));
     |                                      ^
  25 | var tls_1 = __importDefault(require("tls"));
  26 | var fs_1 = __importDefault(require("fs"));
  27 | var channel_buf_1 = __importDefault(require("../channel-buf"));

I think it's related to #396

Could this driver be platform agnostic?

use-neo4j: 0.3.6
neo4j-driver-bolt-connection: 4.4.1
neo4j-driver-core: 4.4.1
react-native: 0.64.3
expo: 4.12.8

@bigmontz
Copy link
Contributor

bigmontz commented Dec 28, 2021

Hi @tomasAlabes,

We currently only support browser and nodejs. I'm not that familiar with the React Native ecosystem/environment.

You can install and configure replacement libraries like react-native-tcp. However, I can not guarantee you will find replacements for all the nodejs's libraries used in the driver.

I will forward this demand for our product team.

Thanks for reporting.

@tomasAlabes
Copy link
Author

Hi @bigmontz, thanks for the answer. I'm not an expert on RN either so I can't help much on recommendations or suggestions. The suggested lib didn't seem to work.
I was trying to build a simple app with a cloud graph db. Something like with firebase. Being that RN is so widely used, it would be nice to have a sample app with the minimal setup.

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

No branches or pull requests

2 participants