I am going through the tutorial and I hit an error when I try to connect to the local websocket server from my React Native app. The error is:
Error: Buffer is not defined
stack:
Function.<anonymous> index.ios.bundle:64324
Function.module.exports.varar [as expr] index.ios.bundle:58951
Table.<anonymous> index.ios.bundle:61785
Table.RDBOp [as constructor] index.ios.bundle:61791
new index.ios.bundle:62148
Function.<anonymous> index.ios.bundle:64402
Function.module.exports.aropt [as table] index.ios.bundle:58972
React.createClass.componentDidMount index.ios.bundle:1493
CallbackQueue.assign.notifyAll index.ios.bundle:6674
ReactNativeReconcileTransaction.ON_DOM_READY_QUEUEING.close index.ios.bundle:16780
ReactNativeReconcileTransaction.Mixin.closeAll index.ios.bundle:7214
ReactNativeReconcileTransaction.Mixin.perform index.ios.bundle:7155
batchedMountComponentIntoNode index.ios.bundle:7516
Object.ReactDefaultBatchingStrategy.batchedUpdates index.ios.bundle:16560
Object.batchedUpdates index.ios.bundle:6444
Object.ReactNativeMount.renderComponent index.ios.bundle:7600
URL: undefined
line: undefined
message: Buffer is not defined
Some relevant code:
var ReactRethinkdb = require('react-rethinkdb');
var r = ReactRethinkdb.r;
//...
ReactRethinkdb.DefaultSession.connect({
host: 'localhost',
port: 8015,
path: '/db',
secure: false,
db: 'test',
});
//...
console.log(r.table('turtles'));
I am going through the tutorial and I hit an error when I try to connect to the local websocket server from my React Native app. The error is:
Some relevant code: