Repository: deno
Issue: Bug: Panic when running astro's `test:node` task
Labels: bug,cli

## Steps to reproduce

1. Clone https://github.com/withastro/astro
2. `cd` into cloned repository
3. Run `pnpm i`
4. Run `cd packages/astro`
5. Run `DENO_FUTURE=1 deno task test:node`

Output:

```sh
$ DENO_FUTURE=1 deno  task "test:node"
Warning Ignoring dependency '@astrojs/internal-helpers' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Warning Ignoring dependency '@astrojs/markdown-remark' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Warning Ignoring dependency '@astrojs/telemetry' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Warning Ignoring dependency 'astro-scripts' in package.json because its version requirement failed to parse: Not implemented scheme 'workspace'
Task test:node astro-scripts test "test/**/*.test.js"

============================================================
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 aarch64
Version: 1.43.5
Args: ["/Users/marvinh/.deno/bin/deno", "run", "--ext=js", "-A", "/Users/marvinh/dev/oss/astro/packages/astro/node_modules/.bin/../astro-scripts/index.js", "test", "test/**/*.test.js"]

thread 'main' panicked at cli/module_loader.rs:583:7:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

Running with `RUST_BACKTRACE=full`:

```sh
internal error: entered unreachable code
stack backtrace:
   0:        0x101e8b340 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0aa20ca08aeb683c
   1:        0x101066818 - core::fmt::write::h168dbafcf35bac68
   2:        0x101e5ef44 - std::io::Write::write_fmt::hdb0dd3f09dcf2281
   3:        0x101e8d47c - std::sys_common::backtrace::print::h57b289e4b951ee17
   4:        0x101e8d1a8 - std::panicking::default_hook::{{closure}}::h783b6c512154ec65
   5:        0x101e8cd68 - std::panicking::default_hook::hcdfa9e1e0f234a4f
   6:        0x100f0f4a8 - deno::setup_panic_hook::{{closure}}::ha2aafdfc350a3ea6
   7:        0x101e8de10 - std::panicking::rust_panic_with_hook::h9aea678ca49d64cf
   8:        0x101e8dba4 - std::panicking::begin_panic_handler::{{closure}}::ha16c3377e66deceb
   9:        0x101e8db34 - std::sys_common::backtrace::__rust_end_short_backtrace::hea8fdda1ea8a4c0e
  10:        0x101e8db28 - _rust_begin_unwind
  11:        0x101064bc0 - core::panicking::panic_fmt::h1cb43b60f5788132
  12:        0x101066544 - core::panicking::panic::h3131e0868b9f8622
  13:        0x100e3fd04 - deno::module_loader::CliModuleLoader<TGraphContainer>::load_prepared_module::h54e65c30bbda6bec
  14:        0x100e40be0 - <deno::module_loader::CliModuleLoader<TGraphContainer> as deno_core::modules::loaders::ModuleLoader>::load::h315a892738e6e2a4
  15:        0x101150c78 - deno_core::modules::recursive_load::RecursiveModuleLoad::register_and_recurse_inner::{{closure}}::hbd56a1988c9938b3
  16:        0x101153f94 - <deno_core::modules::recursive_load::RecursiveModuleLoad as futures_core::stream::Stream>::poll_next::hcdb7cf8647852894
  17:        0x1011c9d58 - deno_core::modules::map::ModuleMap::poll_progress::h8ebce3bee7a40a46
  18:        0x1011c88dc - deno_core::runtime::jsruntime::JsRuntime::poll_event_loop::h12b033846c9a32d3
  19:        0x100d626b8 - deno_core::runtime::jsruntime::JsRuntime::run_event_loop::{{closure}}::h605f18e017994981
  20:        0x100bdfa78 - deno_runtime::worker::MainWorker::run_event_loop::{{closure}}::h9033f81e4625fb29
  21:        0x100ef08fc - deno::worker::CliMainWorker::run::{{closure}}::he2c9cbcac2092a2d
  22:        0x100ebfae0 - deno::tools::run::run_script::{{closure}}::hfc1b6964dbd6bf4d
  23:        0x100ef7a80 - deno::spawn_subcommand::{{closure}}::h0ddab228bd82e21e
  24:        0x100d4a8f8 - <deno_unsync::task::MaskFutureAsSend<F> as core::future::future::Future>::poll::h8fa818a5ceb19cba
  25:        0x100ca85bc - tokio::runtime::task::raw::poll::h01652e7c4a96f760
  26:        0x100f10cec - deno::main::hcbbad7e3542a365a
  27:        0x100c10424 - std::sys_common::backtrace::__rust_begin_short_backtrace::ha44f1b1065dea861
  28:        0x100f7a174 - _main
```

Version: Deno 1.43.5