DenoDDeno
Powered by
divinefluD
Denoβ€’10mo agoβ€’
1 reply
divineflu

why does deno compile read my other directories ?

If i run this on an empty directory with nothing but a main.ts,
deno compile main.ts
deno compile main.ts

It tries to walk up the file tree and find other folders with node_modules/package.json ( not sure what its looking for )
And compilation never ends.

the contents of
main.ts
main.ts
are just
import open from "jsr:@rdsq/open"
await open("https://www.youtube.com/watch?v=dQw4w9WgXcQ");
import open from "jsr:@rdsq/open"
await open("https://www.youtube.com/watch?v=dQw4w9WgXcQ");


However, if i have a package.json in the same directory, it compiles pretty quick and i get an executable which works.

it shows these warnings which shows paths from files that are way off my current working directory,
and a lot of the same warnings for different node projects in my filesystem is printed.
Warning Failed resolving symlink. Ignoring.
    Path: /home/div/.local/share/Trash/files/web1/node_modules/typescript
    Message: Reading symlink target '/home/div/.local/share/Trash/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript': No such file or directory (os error 2)
Warning Failed resolving symlink. Ignoring.
    Path: /home/div/.local/share/Trash/files/web1/node_modules/typescript
    Message: Reading symlink target '/home/div/.local/share/Trash/node_modules/.pnpm/typescript@5.7.2/node_modules/typescript': No such file or directory (os error 2)


I'm on
Deno 2.3.6
Deno 2.3.6
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Does Deno Compile Support Deno Serve --parallel?
PirateSharkPPirateShark / help
9mo ago
deno compile optimizations
subbedSsubbed / help
14mo ago
deno compile error
AuxyAAuxy / help
16mo ago
Deno compile optimization
mallquestMmallquest / help
3y ago