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?
@merhawie said in Buffer not defined error:
Buffer is not defined
Hi @merhawie, that's right, I think you need to add "buffer"
as a dependency on package.json
. I've just added this to the RN caveats.
import { Buffer } from "buffer";
import { AsyncStorage } from 'react-native';
window.localStorage = AsyncStorage;
global.Buffer = Buffer;