You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
file:///xxxxxxxx/node_modules/y-websocket/bin/server.js:6
const WebSocket = require('ws')
^
ReferenceError: require is not defined
at file:///xxxxxxx/node_modules/y-websocket/bin/server.js:6:19
at ModuleJob.run (internal/modules/esm/module_job.js:146:23)
at async Loader.import (internal/modules/esm/loader.js:165:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
Expected behavior a notice to say that y-webserver is running on port 1234
Environment Information node v14.15.1 y-webserver 1.3.14
y-webserver Version 1.3..11 didn't have this problem.
I'm sorry for that. I fixed another bug with that but I broke the server by doing that. I will wait for the next major release to rewrite the server as an ESM module.
I'll shortly release a new version with a fix.
billiegoose
added a commit
to stoplightio/y-websocket
that referenced
this issue
Sep 29, 2021
* Update README.md
* fix: Memory leak with old versions of yjs
Versions of yjs prior to `13.4.6` did not emit a `"destroy"` event when a doc is destroyed, meaning that doc's in the websocket servers memory are not correctly cleaned up.
* Update package-lock.json
* Extendable messageHanlers
* update deps
* 1.3.10
* remove node types from client code
* 1.3.11
* lint
* Add info about y-websocket-server to quick-start
* add on exit handler for Node.js environments
* 1.3.14
* Fix a `peerDependencies` typo in `package.json`
* fix typo
* Remove dependency on window - fixesyjs#65
* 1.3.12
* use condititional exports of dependencies
* 1.3.13
* set correct module type
* 1.3.14
* fixyjs#69 by reverting esm change
* 1.3.15
* Fix beforeunload memory leak
* 1.3.16
Co-authored-by: Kevin Jahns <[email protected]>
Co-authored-by: Tom Moor <[email protected]>
Co-authored-by: Kevin Jahns <[email protected]>
Co-authored-by: Hans Pagel <[email protected]>
Co-authored-by: Thomas Parisot <[email protected]>
Co-authored-by: Nemanja Tosic <[email protected]>
Bug Running
yields
To reproduce:
(installs 1.3.14) Then
which generates:
Expected behavior a notice to say that y-webserver is running on port 1234
Environment Information node v14.15.1 y-webserver 1.3.14
y-webserver Version 1.3..11 didn't have this problem.
Huly®: YJS-504
The text was updated successfully, but these errors were encountered: