question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)”

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
eveningkidcommented, Jun 12, 2020

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.

2reactions
jsundracommented, Jun 6, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

No such file or directory (os error 2) · Issue #6057 - GitHub
Running a simple oak server to illustrate deno-react-example using deno 1.0.3 on Ubuntu results in: "error: No such file or directory (os ......
Read more >
error 2 No such file or directory - python - Stack Overflow
i'm trying to run python script which already ran on test environment. already checked if the path correct and if the file in...
Read more >
No such file or directory (os error 2) when doing cargo run
I installed Rust on my M1 Mac mini. Notice below how the Cargo. toml file it says it cannot find is two directories...
Read more >
[Solved] IOError errno 2 no such file or directory - Python Pool
The 'errorno 2 no such file or directory' is thrown when you are trying to access a file that is not present in...
Read more >
Python FileNotFoundError: [Errno 2] No such file or directory ...
The Python FileNotFoundError: [Errno 2] No such file or directory error is often raised by the os library. This error tells you that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found