Issue Building client-sdk-js: Rollup Errors and Incomplete Bindings
CSantosM opened this issue · 3 comments
Describe the bug
Hi there,
I'm currently facing difficulties while attempting to build the client-sdk-js, encountering issues with both the build:watch and build scripts.
build:watch Script:
After installing the dependencies and executing the build:watch script, Rollup throws an error, preventing successful execution.
build Script:
Running the build script results in warnings, and when I attempt to install the generated build in a project, there seem to be missing bindings for certain methods. This leads me to believe that the build process might not be completing properly.
I would appreciate any guidance or assistance in resolving these issues. If there are specific steps or considerations I might be missing during the build process, please let me know.
Thanks in advance for your help!
Reproduction
pnpm install
pnpm build:watch
Logs
No response
System Info
Ubuntu
Node v20.11.0
Building client-sdk-js from master
Severity
blocking all usage of LiveKit
Additional Information
No response
thanks for the report, try by adding --bundleConfigAsCjs
to the command in the build:watch
script.
Will open a PR to address this.
Note that it might require two watch processes to run though, as the worker for E2EE is built with a separate rollup config
Running the build script results in warnings, and when I attempt to install the generated build in a project, there seem to be missing bindings for certain methods. This leads me to believe that the build process might not be completing properly.
I'll need more info for this. The normal build script works fine for me and some warnings are (unfortunately) expected due to some third party libraries we use.
What do you mean by missing bindings for certain methods?
Be aware that main
is currently pointing to an (unreleased) major update that has some breaking API changes.
If you want the latest v1.x
, checkout the v1
branch
After adding the flag mentioned in the build:watch script, the following warnings appear. If unfortunately it is part of the third party element (rollup) and nothing can be done, we can ignore it.
I have verified that with the introduced flag, the build:watch script now runs without any issues.
Added PR here #1017