Error module not found from bun build
metaspartan opened this issue · comments
Carsen Klock commented
What version of Bun is running?
v1.1.8
What platform is your computer?
Linux 6.5.0-28-generic x86_64 x86_64
What steps can reproduce the bug?
error: Cannot find module "./widgets/node" from "/$bunfs/root/test"
Bun v1.1.8 (Linux x64)
import blessed from "blessed";
const screen = blessed.screen({
smartCSR: true,
title: 'Test',
});
const hellobox = blessed.box({
content: "Hello World!",
height: '25%',
left: 'center',
top: 'center',
});
// display hello world
screen.append(hellobox)
screen.on('keypress', (ch, key) => {
if (key.name === 'q') {
screen.destroy();
}
});
screen.render();
(index.ts code)
Trying to compile a blessed test app (https://www.npmjs.com/package/blessed) with bun, always ends up returning this error, I can also confirm just running bun run index.ts
works without issue, the end binary after bun build --compile
results in the error above.
What is the expected behavior?
It should display "Hello World!" in the terminal where the binary is ran
What do you see instead?
Instant crash:
error: Cannot find module "./widgets/node" from "/$bunfs/root/test"
Bun v1.1.8 (Linux x64)
Additional information
No response