### Bug description

I tried to use Quarto with a sqlite database, but it does not seem to be working. Below is an error message I get when I open the generated html file in the browser. The reprex is also below. [Here ](https://observablehq.com/d/a9047fb68f840243)is an observablehq workbook where this sqlite database works with no issues. I assume this happens because sqlite.js is not loaded in Quarto whilst in observablehq, it is a part of their standard library. In addition, Quarto [documentation ](https://quarto.org/docs/interactive/ojs/data-sources.html) links [observablehq/stdlib](https://github.com/observablehq/stdlib#attachment_sqlite) which I think is rather unfortunate because the examples from there need to be first translated to ojs dialect of JavaScript. For example, the observablehq/stdlib documentation mentions this code `const db = await FileAttachment("chinook.db").sqlite();`, which contains the const, which is not used in Quarto context I believe.


![image](https://user-images.githubusercontent.com/39886440/199946915-b44b0d4f-5220-452f-81ec-d6784772872d.png)

````
---
title: "Quarto with sqlite database"
format:
  html:
    self-contained: true
mode: visual
---

```{r include=F}

library(DBI)

n <- 10000
df <- data.frame(
  cat = letters[1:2] |> sample(size = n, replace = T),
  num = runif(n)
)

con <- dbConnect(RSQLite::SQLite(), "sqlite.db")
dbWriteTable(con, "table", df, overwrite = T)

dbDisconnect(con)

```

```{ojs}
//| echo: false

db = await FileAttachment("sqlite.db").sqlite();

```
````
Windows operating system

RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36

### 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.
- [X] 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.
cscheid
2022-11-04T10:20:08Z
novotny1akub
bug ojs-engine
v1.2
closed
Quarto with SQLite does not seem to be working
https://github.com/quarto-dev/quarto-cli/issues/3163