You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is running on a nextjs server, server action, this is the code to get the error:
export async function generateDeckFromAnkiFile(formData: FormData) {
const file = formData.get("file") as File;
readAnkiPackage(file).then((extractedPackage) => {
const { collection, media } = extractedPackage;
const decks = collection.getDecks();
for (const [deckId, deck] of Object.entries(decks)) {
console.log(deckId, deck.getRawDeck());
for (const [cardId, card] of Object.entries(deck.getCards())) {
console.log(cardId, card.getRawCard());
}
}
for (const [name, blob] of Object.entries(media)) {
console.log(name, blob);
}
});
}
⨯ unhandledRejection: Error: Error loading SQLite database
at eval (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:24:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async readAnkiCollection (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:17:24)
at async eval (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:73:28)
at async readAnkiPackage (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:67:12)
The text was updated successfully, but these errors were encountered:
This is running on a nextjs server, server action, this is the code to get the error:
⨯ unhandledRejection: Error: Error loading SQLite database
at eval (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:24:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async readAnkiCollection (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:17:24)
at async eval (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:73:28)
at async readAnkiPackage (webpack-internal:///(action-browser)/./node_modules/anki-reader/lib/src/index.js:67:12)
The text was updated successfully, but these errors were encountered: