bun icon indicating copy to clipboard operation
bun copied to clipboard

Cannot find module from "bun:main"

Open seuai opened this issue 2 years ago • 5 comments

What version of Bun is running?

0.7.2

What platform is your computer?

Linux 3.10.0-1127.10.1.el7.x86_64 x86_64 x86_64 x64

What steps can reproduce the bug?

curl -fsSL https://bun.sh/install | bash

mkdir quickstart
cd quickstart
bun init
bun run index.ts

What is the expected behavior?

No error when using script from documentation

What do you see instead?

error: Cannot find module "../quickstart/index.ts" from "bun:main"

Additional information

CentOS-7 glibc-2.28

seuai avatar Aug 04 '23 13:08 seuai

Try using index.js

samuelnihoul avatar Aug 04 '23 15:08 samuelnihoul

Try using index.js

created a index.js file and tested it.

error: Cannot find module "../project/index.js" from "bun:main"

seuai avatar Aug 04 '23 16:08 seuai

+1

isaced avatar Oct 15 '23 14:10 isaced

This is likely a result of using a really old Linux kernel.

Electroid avatar Oct 26 '23 22:10 Electroid

macos 14 also has this problem of writing a library by itself, other projects using vscode have been recognized normally, but the module can not be found when running

eyesspace avatar May 22 '24 08:05 eyesspace