error: No such file or directory (os error 2)
See original GitHub issueHi 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:
- Created 3 years ago
- Comments:20 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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 runningdeno 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
ortransaction.js
, they would run fine withdeno info
, which then when runningdeno 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