question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-native colyseus.js 0.11.0 error

See original GitHub issue

Image of Yaktocat

package.json …

"dependencies": {
    "buffer": "^5.4.0",
    "colyseus.js": "^0.11.0",
    "react": "16.8.6",
    "react-native": "0.60.5"
  },

import React, { Component } from 'react';
//import Board from './Board';
//import './css/board.css';
import * as Colyseus from "colyseus.js";
import { AsyncStorage, View, Text } from 'react-native';

import { Buffer } from "buffer";
window.localStorage = AsyncStorage;
global.Buffer = Buffer;


export default class Game extends Component {

    constructor(props) {
        super(props);

        this.colyseus = new Colyseus.Client('ws://31.173.240.80:2567')
        this.colyseus.joinOrCreate("gamebot")

/*
        this.colyseus.joinOrCreate("gamebot").then(room => {
            console.log("joined successfully", room);
        }).catch(e => {
            console.error("join error", e);
        });
*/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
endelcommented, Dec 16, 2019

This has been fixed on httpie@^2.0.0-next.3 (https://github.com/lukeed/httpie/issues/21)

Please remove your package-lock.json and node_modules and install them again. If you have build your expo project recently, please also use expo --clean to clear the build cache.

0reactions
endelcommented, Jan 26, 2020

Hi @ArdaNakisci, I’ve just released version 0.12 of the server and clients. I’ve bumped the version of httpie there, let me know if that works for you! Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript - Colyseus & Arena Cloud ... - Colyseus docs
Documentation for Colyseus Multiplayer Framework for Node.js.
Read more >
JavaScript Client - Colyseus 0.10.x
This client works with React Native. You need to install some aditional dependencies for compatibility and assign window.localStorage to AsyncStorage . npm ...
Read more >
JavaScript - Colyseus & Arena Cloud ... - Colyseus docs
Documentation for Colyseus Multiplayer Framework for Node.js.
Read more >
0.11 - Colyseus & Arena Cloud Documentation
Documentation for Colyseus Multiplayer Framework for Node.js.
Read more >
handl error when client recconect(SOLVED)
Hi , i have a question there is a way to handle error in the client side ... Documentation for Colyseus Multiplayer Framework...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found