Jox
Jox•11mo ago

Module not found when running deno run

Something weird has started happening. When I run deno run src/main.ts it seems as if Deno is trying to run it from a completely bonkers file path. error: Module not found "file:///Users/me/Projects/my-project/src/Users/me/Projects/my-project/src/main.ts". I don't know what's happened and why it seems to append the Users folder twice. Does anyone have any idea?
4 Replies
ioB
ioB•11mo ago
What does pwd return?
cknight
cknight•11mo ago
Is your 'src' a symlink perhaps to "Users/me/Project/my-project/src"?
Vanadium
Vanadium•11mo ago
That would not make sense. Or maybe.
Jox
Jox•11mo ago
/Users/me/Projects/my-project I have not symlinked anything by my own hand 🙂 I figured out the culprit.
"/": "./src/",
"/": "./src/",
in my deno.json imports Which means deno run ./src/main.ts has to change to deno run /main.ts