### Bug description

I have a markdown file like this:

````
---
title: "Report"
date: last-modified
---

```{julia}
#| error: true
data1 = zeros(3, 3, 3)
data2 = zeros(3, 3)

data1[:, :, 2] .= 1.0

data2 .= data1
```

```{mermaid}
%%| echo: false
flowchart LR
  Main(Main) --> lib1(lib1)
  Main(Main) --> lib2(lib2)
  Main(Main) --> lib3(lib3)
```

````

with a `_quarto.yml` like this:


```
project:
  preview:
    port: 4200

quarto-required: ">= 1.3.0"
jupyter: julia-1.9
execute:
  output: true
  echo: true
  warning: true
  error: false
  freeze: auto
  eval: true
  cache: true
```

With this version:

```
$ quarto --version
1.3.353
```

I get this error:

```
error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises.
```

With this version:

```
$ quarto --version
1.4.84
```

I get this error:


```
error: Top-level await promise never resolved
        await quarto(quartoArgs, (cmd)=>{
        ^
    at <anonymous> (file:///C:/Users/USERNAME/AppData/Local/Programs/Quarto/bin/quarto.js:102268:9)
```

This was the same error I was getting in this issue:

https://github.com/quarto-dev/quarto-cli/issues/5580

Removing the `{mermaid}` executable block makes the error go away.

I'm running this on Windows.

```
$ quarto check

[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.4.84
      Path: C:\Users\USERNAME\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.9.12 (Conda)
      Path: C:/Users/USERNAME/Miniconda3/python.exe
      Jupyter: 5.1.0
      Kernels: python3, julia-1.9

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........(None)     

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

```

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
2023-05-23T16:39:22Z
kdheepak
bug needs-repro windows triaged-to stale
closed
error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promises.
https://github.com/quarto-dev/quarto-cli/issues/5647