denodb: error: No such file or directory (os error 2)

Hi guys,

System

Linux Elementary OS 5.1.5 deno 1.0.5 v8 8.4.300 typescript 3.9.2

Issue

import { Database } from "https://deno.land/x/denodb/mod.ts"

export const db = new Database("postgres", {
  username: "bot",
  password: "password",
  database: "bot",
  host: "localhost",
  port: 5435,
})
console.log(db)

When I run deno run -A --unstable thiscode.ts it outputs “No such file or directory (os error 2)”

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (5 by maintainers)

Most upvoted comments

Alright, they just dropped 1.1.

Run deno upgrade and you should be all good.

If it happens not to fix your issue after upgrading, feel free to reopen the issue.

In any event, this issue is not directly related to denodb, but deno itself.

@0xdv: next time, open another issue as this is not related. About your question, it is just the way deno_mongo works internally. As it is part of the dependencies, denodb now requires the --unstable option. I will have to see if we can improve this if that bugs some other people.

I got things to work, but I don’t have any reason why, other than that the latest version of deno might be doing something weird (an earlier post mentioned deno v1.0.0 working fine).

What I did, was to close denodb & dex locally, and use those as imports. It still failed with using deno info. I dug through my local dex clone and just kept brute force commenting out imports and running deno info on the imports that seemed problematic.

I was assuming I’d finally reach an import that was pinned to an older version that needed updating. Nope. When I dug down to some of the single files that were problematic, such as logger.js or transaction.js, they would run fine with deno info, which then when running deno info mod.ts on the whole repo, caused that call to succeed.

So with zero local changes to my denodb or dex repos, my project can compile fine (even when running with --reload). shrugs

Also for what it’s worth, I found out you can run deno info -L debug to get a ton of data. But it isn’t that helpful for debugging, since it will still choke on the path issue with the most recent log entry being the most recent success. But still figured I’d pass on what I learned~

Thanks for letting me know, I’m sure this will be fixed soon enough.

Let’s wait a little 😃

I still get this issue. But… the issue is also reported by Deno -> https://github.com/denoland/deno/issues/6057