y-websockets-client
y-websockets-client copied to clipboard
Cannot read property 'typeDefinition' of undefined
Hi there, getting the following error when running the tutorial.
The console error:
Database.js:576
Uncaught TypeError: Cannot read property 'typeDefinition' of undefined
at t.<anonymous> (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:8:8205)
at i (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:7545)
at Generator._invoke (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:8947)
at Generator.e.(anonymous function) [as next] (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:7724)
at i (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:7545)
at Generator._invoke (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:8586)
at Generator.e.(anonymous function) [as next] (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:7724)
at i (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:7545)
at Generator._invoke (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:8586)
at Generator.e.(anonymous function) [as next] (https://tallylab-aphelionz.c9users.io/app/bower_components/yjs/y.js:7:7724)
My bower.js
"dependencies": {
"y-js": "*",
"y-webrtc": "^8.0.7",
"y-memory": "^8.0.9",
"y-map": "^10.1.3",
"y-array": "^10.1.4",
"y-websockets-client": "^8.0.16",
"y-test": "^0.4.1"
}
My initialization JavaScript:
Y({
db: {
name: 'memory' // store the shared data in memory
},
connector: {
name: 'websockets-client', // use the websockets connector
room: 'my room' // Instances connected to the same room share data
// url: 'localhost:1234' // specify your own server destination
},
share: { // specify the shared content
map: 'Map', // y.share.map is of type Y.Map
array: 'Array' // y.share.array is of type Y.Array
},
sourceDir: '/app/bower_components' // where the modules are (browser only)
}).then(function (y) {
/*
At this point Yjs is successfully initialized.
Try it out in your browser console!
*/
window.y = y
console.log('Yjs instance ready!')
y.share.map // is an Y.Map instance
y.share.array // is an Y.Array instance
})
This looks pretty pretty dangerous, considering that we have an incompatible beta release running too.
"y-js": "*",
Can you check which version is actually installed?
And I'm really sorry for the late answer .. I didn't see the issue and just stumbled on it..