divineflu
divineflu3mo ago

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 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 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
1 Reply
marvinh.
marvinh.3mo ago
Can you file an issue for that https://github.com/denoland/deno/issues ?
GitHub
denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.

Did you find this page helpful?