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 develop with linked matrix-js-sdk #3081

Open
robintown opened this issue Mar 11, 2025 · 2 comments
Open

Cannot develop with linked matrix-js-sdk #3081

robintown opened this issue Mar 11, 2025 · 2 comments
Assignees
Labels
A-Developer-Experience Workflow of developing: building, linting, debugging, profiling, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems

Comments

@robintown
Copy link
Member

Steps to reproduce

  1. Pull the latest version of livekit
  2. yarn install
  3. yarn link matrix-js-sdk
  4. yarn dev
  5. Open Element Call in a browser

Outcome

What did you expect?

Element Call starts

What happened instead?

The page crashes on a white screen because there is a decorator used in matrix-js-sdk/src/http-api/fetch.ts, which Babel does not transpile. I thought https://stackoverflow.com/a/69665198 might be the solution here but it still doesn't transpile the decorator. (why?)

Operating system

NixOS 24.11

Browser information

Firefox 135.0.1

URL for webapp

No response

Will you send logs?

No

@robintown robintown added A-Developer-Experience Workflow of developing: building, linting, debugging, profiling, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems labels Mar 11, 2025
@robintown
Copy link
Member Author

This is blocking my work on element-hq/element-web#29429

@toger5
Copy link
Contributor

toger5 commented Mar 13, 2025

Syncing with the web team gave the following result:
https://docs.google.com/document/d/1Qr2ocRQFSx4Vp9qPUu4rxP5f8j1JLrdxcPVZHvjynZk/edit?tab=t.0#heading=h.m8zbp5oc221e

We seek for confirmation if it makes sense to move to matrix-js-sdk/lib imports (currently we import src)

  • src imports were never supported. The react sdk used it since then but that also implied headaches (EW still uses it as of now. Its planned to change (use lib imports) eventually)
  • Watch mode on the js-sdk to auto-run tsc
  • Mixing lib+scr will make us end up with two versions.
  • A specific git commit hash in package.json is not supported with lib imports anymore.
    Any other recommendations/tips?
  • Vite uses rollup under the hood and ts is able to build transpile decorators natively nowadays -> maybe we can get Vite develop mode working by adjusting the ts config.

I tested what it would take to move over to lib imports.
This is the changes for element-call: #3093

(I previously needed a bunch of changes in the js-sdk as well. There seemed to be workarounds however)

I gave this a bit more touching up. I think it might make sense to make a draft PR out of the branch.
@robintown do you think you have time to mention this next week and eventually move it forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Developer-Experience Workflow of developing: building, linting, debugging, profiling, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems
Projects
None yet
Development

No branches or pull requests

2 participants