Has anyone done this successfully and have a working code base? specifically when I try to use a neo4j driver it starts complaining that a bunch of really basic modules can't be found (assert, http, buffer, net etc). I've tried node-neo4j and neo4j-driver.
有没有人成功完成这项工作并拥有可用的代码库?特别是当我尝试使用neo4j驱动程序时,它开始抱怨无法找到一堆真正基本的模块(断言,http,缓冲区,网络等)。我试过node-neo4j和neo4j-driver。
I try to install these modules one by one but that doesn't seem right.
我尝试逐个安装这些模块,但这似乎不对。
Note that this is specific to react-native, if I use normal react on the front end and nodejs on the back end it seems to work fine
请注意,这是特定于react-native,如果我在前端使用正常反应而在后端使用nodejs它似乎工作正常
I took out almost everything out of my code to isolate the problem.
我从代码中取出几乎所有内容来隔离问题。
Working:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TextInput,
View,
BackAndroid,
Navigator,
ToolbarAndroid,
TouchableHighlight,
Alert
} from 'react-native';
class AwesomeProject extends Component {
render() {
return (
<Text>HI</Text>
)
}
}
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
Not working:
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TextInput,
View,
BackAndroid,
Navigator,
ToolbarAndroid,
TouchableHighlight,
Alert
} from 'react-native';
var neo4j = require('neo4j-driver').v1;
var driver = neo4j.driver("bolt://localhost", neo4j.auth.basic("neo4j", "neo4j"));
var session = driver.session();
class AwesomeProject extends Component {
render() {
return (
<Text>HI</Text>
)
}
}
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
1 个解决方案
#1
0
npm install net
will resolve that dependancy.
npm install net将解决这种依赖性。
#1
0
npm install net
will resolve that dependancy.
npm install net将解决这种依赖性。