db.get() is not a function #327
Answered
by
johnlindquist
benjaminmodayil
asked this question in
Errors
-
|
I'm trying to get a script working with a db, but haven't had any luck and continually get the error: Does anyone know what I'm doing wrong here? Did I miss a basic step? |
Beta Was this translation helpful? Give feedback.
Answered by
johnlindquist
Jun 23, 2021
Replies: 1 comment 1 reply
-
|
Hi @benjaminmodayil ,
Here's the basics based on the sample code posted: let itemsDb = await db("my-awesome-db", {
items: ["First item"],
})
itemsDb.items.push(await arg("add an item"))
await itemsDb.write()
show(`<div>${JSON.stringify(itemsDb.items)}</div>`) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
benjaminmodayil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @benjaminmodayil ,
dbhad a breaking change in a recent build due to LowDB updating to 2.0: #304Here's the basics based on the sample code posted: