Open nushankodikara opened 2 weeks ago
When running bundled code, one interesting thing: the code infinite loops in Html.createElement
:
// node_modules/@elysiajs/html/dist/h.js
var exports_h = {};
__export(exports_h, {
createElement: () => {
{
return createElement;
}
},
});
var html = __toESM(require_html(), 1);
var createElement = (name, attrs, ...children) => {
const { $elysia, ...attr } = attrs ?? {};
const a2 = html.createElement(name, attr, ...children);
return a2;
};
Earlier:
// node_modules/@elysiajs/html/dist/index.js
var import_html = __toESM(require_html(), 1);
Html.createElement = createElement;
I believe that is a bundler bug (cc @paperdave)
But, this error does not occur when run directly. Only when running bun build
on the src/index.tsx
file.
I'm not yet able to reproduce this crash, unfortunately
How can we reproduce the crash?
I have compiled the following docker image and while running it got this error on Fedora Server
Linux localhost.localdomain 6.9.4-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 12 13:33:34 UTC 2024 x86_64 GNU/Linux
https://hub.docker.com/r/nushankodi/nutrimax-searchRelevant log output
Stack Trace (bun.report)
Bun v1.1.16 (
bf7b327
) on linux x86_64_baseline [AutoCommand]Illegal instruction at address 0x564A4D231FAB
??
work_pool.zig:17
:src.work_pool.NewWorkPool
work_pool.zig:27
:src.bun.js.module_loader.RuntimeTranspilerStore.transpile
module_loader.zig:2383
:Bun__transpileFile
ModuleLoader.cpp:765
:Bun::fetchESMSourceCodeAsync
ZigGlobalObject.cpp:3879
:Zig::GlobalObject::moduleLoaderFetch
ld-temp.o:0
:JSC::moduleLoaderFetch
ld-temp.o:0
:llint_op_call
ld-temp.o:0
:llint_op_call