I am working on RN using colyseus.js. I am stuck on a "Buffer is not defined" error. It indicates that this is stuck on Room.patch
What might this be caused by?
I am working on RN using colyseus.js. I am stuck on a "Buffer is not defined" error. It indicates that this is stuck on Room.patch
What might this be caused by?
@endel - following this solution I believe there may be an issue with this.connection not being set before client.join command is run. Consequently - there error I am seeing (once the above was solved in 0.9.11) is "Cannot read property 'send' of undefined" @Client.join - Client.js@35
Note - I am running on localhost based on the "chat room" example.
Has anyone else run into this problem?
@endel haha ... no problem! I felt bad about not being able to figure out for a few days playing with various babel settings. Thank you for finding the fix
@endel - thank you for the quick response! Here is my App.js import stack:
import 'react-native-browser-polyfill';
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, AsyncStorage} from 'react-native';
//Necessary libraries for Colyseus
window.localStorage = AsyncStorage;
import Colyseus from "colyseus.js";
Below is a screenshot of the actual error I am receiving:
The text of the error that I get is the following:
undefined is not an object (evaluating 'storage.getItem')
getItem (Storage.js:11:24)
Client (Client.js:22:26)
<unknown> (App.js:25:33)
This last line references code outside of the class definition (but the same thing occurs if initialized in the constructor), the line reads: var client = new Colyseus.Client(endpoint);
Does this help? Do I need to provide a screenshot?
I am having trouble getting a basic client. Can someone post a basic running app with initialization? I get failure when instantiating colyseus (new Colyseus.Client(...))