Skip to content

Instantly share code, notes, and snippets.

@fand
Created May 14, 2020 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fand/f9685acad09184b920397ca8b16a8826 to your computer and use it in GitHub Desktop.
Save fand/f9685acad09184b920397ca8b16a8826 to your computer and use it in GitHub Desktop.
deno error log
~ ❯ brew install deno
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/deno-1.0.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/db/db9f2a4dbacb6ce16a7264ca42c7daf8ace896d9a6e05f4a01f139abddc8c2b7?__gda__=exp=1589443285~hmac=81b0bd11f99f42b4007edad1b43452439d181a92cefc1acde754149da997614b&response-content-disposition=attachment%3Bfile
######################################################################## 100.0%
==> Pouring deno-1.0.0.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/deno/1.0.0: 9 files, 42.0MB
⌚︎ 16s
~ ❯ deno run https://deno.land/std/examples/welcome.ts
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DenoError { repr: Simple(NotFound, "Cannot resolve module \"run\" from \".\"") }', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
~ ❯ deno run https://deno.land/std/examples/welcome.ts ⏎
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DenoError { repr: Simple(NotFound, "Cannot resolve module \"run\" from \".\"") }', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
~ ❯ nano foo.ts ⏎
⌚︎ 7s
~ ❯ deno foo.ts
Compiling /Users/amagi/foo.ts
Downloading https://deno.land/std@0.50.0/http/server.ts...
Downloading https://deno.land/std@0.50.0/encoding/utf8.ts...
Downloading https://deno.land/std@0.50.0/io/bufio.ts...
Downloading https://deno.land/std@0.50.0/testing/asserts.ts...
Downloading https://deno.land/std@0.50.0/async/mod.ts...
Downloading https://deno.land/std@0.50.0/http/_io.ts...
Downloading https://deno.land/std@0.50.0/io/util.ts...
Downloading https://deno.land/std@0.50.0/path/mod.ts...
Downloading https://deno.land/std@0.50.0/path/win32.ts...
Downloading https://deno.land/std@0.50.0/path/posix.ts...
Downloading https://deno.land/std@0.50.0/path/common.ts...
Downloading https://deno.land/std@0.50.0/path/separator.ts...
Downloading https://deno.land/std@0.50.0/path/interface.ts...
Downloading https://deno.land/std@0.50.0/path/glob.ts...
Downloading https://deno.land/std@0.50.0/path/_constants.ts...
Downloading https://deno.land/std@0.50.0/path/_util.ts...
Downloading https://deno.land/std@0.50.0/fmt/colors.ts...
Downloading https://deno.land/std@0.50.0/testing/diff.ts...
Downloading https://deno.land/std@0.50.0/path/_globrex.ts...
Downloading https://deno.land/std@0.50.0/async/deferred.ts...
Downloading https://deno.land/std@0.50.0/async/delay.ts...
Downloading https://deno.land/std@0.50.0/async/mux_async_iterator.ts...
Downloading https://deno.land/std@0.50.0/textproto/mod.ts...
Downloading https://deno.land/std@0.50.0/http/http_status.ts...
Downloading https://deno.land/std@0.50.0/bytes/mod.ts...
/Users/amagi/foo.ts:4:5 - error TS1103: A 'for-await-of' statement is only allowed within an async function or async generator.
4 for await (const req of s) {
~~~~~
⌚︎ 7s
~ ❯ brew uninstall deno ⏎
Uninstalling /usr/local/Cellar/deno/1.0.0... (9 files, 42.0MB)
~ ❯ curl -fsSL https://deno.land/x/install/install.sh | sh
######################################################################## 100.0%
Archive: /Users/amagi/.deno/bin/deno.zip
inflating: deno
Deno was installed successfully to /Users/amagi/.deno/bin/deno
Run 'deno --help' to get started
⌚︎ 8s
~ ❯ deno foo.ts
error: Found argument 'foo.ts' which wasn't expected, or isn't valid in this context
USAGE:
deno [OPTIONS] [SUBCOMMAND]
For more information try --help
~ ❯ deno run foo.ts ⏎
Compile file:///Users/amagi/foo.ts
Download https://deno.land/std@0.50.0/http/server.ts
Download https://deno.land/std@0.50.0/encoding/utf8.ts
Download https://deno.land/std@0.50.0/io/bufio.ts
Download https://deno.land/std@0.50.0/testing/asserts.ts
Download https://deno.land/std@0.50.0/async/mod.ts
Download https://deno.land/std@0.50.0/http/_io.ts
Download https://deno.land/std@0.50.0/io/util.ts
Download https://deno.land/std@0.50.0/path/mod.ts
Download https://deno.land/std@0.50.0/path/win32.ts
Download https://deno.land/std@0.50.0/path/posix.ts
Download https://deno.land/std@0.50.0/path/common.ts
Download https://deno.land/std@0.50.0/path/separator.ts
Download https://deno.land/std@0.50.0/path/interface.ts
Download https://deno.land/std@0.50.0/path/glob.ts
Download https://deno.land/std@0.50.0/path/_constants.ts
Download https://deno.land/std@0.50.0/path/_util.ts
Download https://deno.land/std@0.50.0/fmt/colors.ts
Download https://deno.land/std@0.50.0/testing/diff.ts
Download https://deno.land/std@0.50.0/path/_globrex.ts
Download https://deno.land/std@0.50.0/async/deferred.ts
Download https://deno.land/std@0.50.0/async/delay.ts
Download https://deno.land/std@0.50.0/async/mux_async_iterator.ts
Download https://deno.land/std@0.50.0/textproto/mod.ts
Download https://deno.land/std@0.50.0/http/http_status.ts
Download https://deno.land/std@0.50.0/bytes/mod.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8000", run again with the --allow-net flag
at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
at Object.sendSync ($deno$/ops/dispatch_json.ts:72:10)
at Object.listen ($deno$/ops/net.ts:51:10)
at listen ($deno$/net.ts:152:22)
at serve (https://deno.land/std@0.50.0/http/server.ts:261:20)
at file:///Users/amagi/foo.ts:2:11
~ ❯ deno run --allow-net foo.ts ⏎
http://localhost:8000/
^C
⌚︎ 25s
~ ❯ deno -v ⏎
error: Found argument '-v' which wasn't expected, or isn't valid in this context
USAGE:
deno [OPTIONS] [SUBCOMMAND]
For more information try --help
~ ❯ deno --version ⏎
deno 1.0.0
v8 8.4.300
typescript 3.9.2
@fand
Copy link
Author

fand commented May 14, 2020

When I installed deno by brew install deno and run Getting Started examples, it didn't work.
So I brew uninstalled deno and installed again by install.sh, then it worked correctly.

Maybe it's because of the version of rust on my MBP?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment