-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Etherpad 2.x won't build cleanly on FreeBSD x64 #6696
Comments
Thanks for the issue. I'll let this open so other can see this easily. I've checked every major bundler like esbuild, rspack etc. They all don't have a native runtime for building the UI which is kind of bad. |
Do you mean specifically for FreeBSD x86? Arguably as nominally "pure" JS code it would make sense for Etherpad to be able to run everywhere that Node does, without having build-time dependencies on native binaries. I presume there's no such run-time dependencies? |
Unfortunately not. There is webpack that is written in pure JS. But it's so slow that you can't use it anymore with all the hundreds of packages. Only legacy libraries and applications use it. On the other hand you have these shiny new Rust and Go native packager but they are platform dependent. I was surprised that Vite can't build on every platform. |
Vite is fine if you tell (p)npm to use Unfortunately it appears to be impossible to build even |
I couldn't really find a solution to this. I could go back to webpack but it is so slow and hard to setup. |
The patch I supplied works for FreeBSD. I think if it was to be deployed for other architectures it just means that compilation will use the "not quite as fast" non-native compilers. On the modest VM on which I installed 2.2.5 the compilation was still a lot faster than the older pre-TS build process. I didn't time it but I think it was under 30 seconds. |
But even with the patches you won't have esbuild for hosting the UI don't you? |
I don't understand the question. With the patches above I have a fully operational Etherpad server running from the sources downloaded from GitHub. |
Oh which version do you run on? |
Etherpad 2.2.5 on FreeBSD 14.1 |
Describe the bug
The build system has development dependencies on NodeJS modules for which no FreeBSD-x64 native builds exists
To Reproduce
Steps to reproduce the behavior:
Follow the standard build instructions from README.md to the letter.
Expected behavior
A clean build? ;)
Screenshots
Rollup issue
Rollup has no native build on FreeBSD - a WASM build is required instead
Vite React SWC plugin issue
vitejs/plugin-react-swc also has some native dependency, and tries to load a non-existent
@swc/core-wasm32-wasi
module if that's not found.Server (please complete the following information):
node --version
): v20.15.1npm --version
): 10.8.1pnpm --version
): 9.12.0Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Fixes
I don't necessarily propose that these should be adopted universally, but they're what worked for me. That said, they should work universally at the expense of a little build time. They tell Rollup to use the WASM compiler, and use the standard Vite React plugin instead of the SWC version:
After applying this patch it's necessary to remove
pnpm-lock.json
before runningpnpm i
.The text was updated successfully, but these errors were encountered: