Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot do require('y-websocket/bin/utils.js') since v1.3.13 #73

Closed
hesselbom opened this issue Jun 8, 2021 · 2 comments
Closed

Cannot do require('y-websocket/bin/utils.js') since v1.3.13 #73

hesselbom opened this issue Jun 8, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hesselbom
Copy link

Describe the bug
I've written my own websocket server based on y-websocket/bin/server.js but instead of rewriting y-websocket/bin/utils.js I've been requiring that file like this:

const yWebsocketUtils = require('y-websocket/bin/utils.js')

but since v1.3.13 (where explicit "exports" was added to package.json) I now get this error in Node.js:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './bin/utils.js' is not defined by "exports" in /node_modules/y-websocket/package.json

Expected behavior
Being able to require subpaths in y-websocket to help custom websocket servers.

Environment Information

  • Node.js v12
  • y-websocket v1.3.13
@hesselbom hesselbom added the bug Something isn't working label Jun 8, 2021
@hanspagel
Copy link
Contributor

I think that’s what is described in #72. ✌️

@hesselbom
Copy link
Author

@hanspagel You're right, that issue covers this so I'll close this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants