DenoDDeno
Powered by
carragomC
Denoβ€’5mo agoβ€’
4 replies
carragom

Deno compile with --include

Hi, playing around with
deno compile --include
deno compile --include
following the docs probably doing something wrong but not sure what. Help appreciated, using v2.5.3. I have the following

names.tsv
John    Doe
Jane    Smith
Alice    Jones
John    Doe
Jane    Smith
Alice    Jones

cli.ts
if (import.meta.main) {
  const names = Deno.readTextFileSync(import.meta.dirname + "/names.tsv");
  console.debug(names);
}
if (import.meta.main) {
  const names = Deno.readTextFileSync(import.meta.dirname + "/names.tsv");
  console.debug(names);
}

After compiling the file with
deno compile cli.ts --include names.tsv
deno compile cli.ts --include names.tsv
and running the resulting binary and get this error:
error: Uncaught (in promise) NotFound: path not found: readfile '/tmp/deno-compile-deno-embed/names.tsv'
  const names = Deno.readTextFileSync(import.meta.dirname + "/names.tsv");
                     ^
    at Object.readTextFileSync (ext:deno_fs/30_fs.js:771:10)
    at file:///tmp/deno-compile-deno-embed/cli.ts:2:22
error: Uncaught (in promise) NotFound: path not found: readfile '/tmp/deno-compile-deno-embed/names.tsv'
  const names = Deno.readTextFileSync(import.meta.dirname + "/names.tsv");
                     ^
    at Object.readTextFileSync (ext:deno_fs/30_fs.js:771:10)
    at file:///tmp/deno-compile-deno-embed/cli.ts:2:22
Deno
`deno compile`, standalone executables
Compile your code into a standalone executable
`deno compile`, standalone executables
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

deno compile --include argument
DNADDNA / help
3y ago
deno compile --include whatev.wasm
bennypBbennyp / help
10mo ago
Include DLL files in deno compile
kingbriKkingbri / help
16mo ago
Problem with Deno's compile
ihermanIiherman / help
5mo ago