nicetomytyukN
Denoβ€’2y agoβ€’
9 replies
nicetomytyuk

readFile path not found

I'm trying to use Deno.readFile but when is execute i get an error about wrong path.

The files are like this:

- db
- dataservice.ts
- config.sql
- index.ts

Then in daatabservice I try:


private async getConfig(): Promise<string> { const decoder = new TextDecoder("utf-8"); const bytes = await Deno.readFile("./config.sql"); return decoder.decode(bytes); }


Error handling product request: NotFound: Impossibile trovare il percorso specificato. (os error 3): readfile './config.sql'
at async Object.readFile (e:\GitHub\GAB-Servizi-SB\eno_fs\30_fs.js:842:18)
Was this page helpful?