denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.28k stars 5.36k forks source link

Panic when using `deno compile` and remote url 404s #16132

Open jcpsimmons opened 2 years ago

jcpsimmons commented 2 years ago

Hello - here as per the CLI's instructions. I am trying to build my command line tool. Here is the repo at the time that I could produce the bug. https://github.com/jcpsimmons/rasa/tree/b05a8d68100f785d16f2fd937f0501390f995ecf

Download https://cdn.skypack.dev/-/aws-lambda@v1.0.7-1Ur26iuIfIR0rJkZpPTF/dist=es2019,mode=types/trigger/cognito-user-pool-trigger/.d.ts
Check file:///Users/joshsimmons/Documents/GitHub/rasa/server/main.ts

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos x86_64
Version: 1.23.1
Args: ["deno", "compile", "main.ts"]

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Missing(Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("cdn.skypack.dev")), port: None, path: "/-/aws-lambda@v1.0.7-1Ur26iuIfIR0rJkZpPTF/dist=es2019,mode=types/trigger/cognito-user-pool-trigger/.d.ts", query: None, fragment: None })', cli/main.rs:425:17
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: deno::compile_command::{{closure}}
   4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   5: deno::main::{{closure}}
   6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   7: deno_runtime::tokio_util::run_basic
   8: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
dsherret commented 2 years ago

Looks like this url is a 404:

https://cdn.skypack.dev/-/aws-lambda@v1.0.7-1Ur26iuIfIR0rJkZpPTF/dist=es2019,mode=types/trigger/cognito-user-pool-trigger/.d.ts

See deno info https://raw.githubusercontent.com/jcpsimmons/rasa/b05a8d68100f785d16f2fd937f0501390f995ecf/server/main.ts for what imports it (https://cdn.skypack.dev/-/aws-lambda@v1.0.7-1Ur26iuIfIR0rJkZpPTF/dist=es2019,mode=types/index.d.ts).