colyseus.js: react-native colyseus.js 0.11.0 error

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);
});
*/
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (5 by maintainers)
This has been fixed on
httpie@^2.0.0-next.3(https://github.com/lukeed/httpie/issues/21)Please remove your
package-lock.jsonandnode_modulesand install them again. If you have build yourexpoproject recently, please also useexpo --cleanto clear the build cache.