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
I'm using mock_file@v1.0.1 with sqlite@v3.4.0 on Deno Deploy with the fresh framework. I get this error:
An error occured during route handling or page rendering. TypeError: originalFunc is not a function
at Object.openSync (https://deno.land/x/mock_file@v1.0.1/src/polyfill.ts:120:20)
at js_open (https://deno.land/x/sqlite@v3.4.0/build/vfs.js:29:24)
at denoOpen (wasm://wasm/002a4c4a:1:3005)
at sqlite3PagerSharedLock (wasm://wasm/002a4c4a:1:30327)
at sqlite3BtreeBeginTrans (wasm://wasm/002a4c4a:1:24816)
at sqlite3InitOne (wasm://wasm/002a4c4a:1:157318)
at sqlite3Init (wasm://wasm/002a4c4a:1:156554)
at sqlite3ReadSchema (wasm://wasm/002a4c4a:1:100815)
at sqlite3LocateTable (wasm://wasm/002a4c4a:1:98255)
at sqlite3LocateTableItem (wasm://wasm/002a4c4a:1:245062)
Running it locally works fine.
The text was updated successfully, but these errors were encountered:
First of all, thank you for your interest in this module!👍
I think I've also encountered this error. The solution at that time was:
The sqlite module will try to write to the journal file. Therefore, it is necessary to prepare a writable temporary file using prepareVirtualFile.
import{prepareLocalFile,prepareVirtualFile,}from"https://deno.land/x/mock_file@$VERSION/mod.ts";constdbFileName="./db.sqlite";awaitprepareLocalFile(dbFileName);prepareVirtualFile(`${dbFileName}-journal`);// <- This line is needed!
We apologize if you have already done this. In that case, could you please provide the code that can reproduce the error?
I will work to improve this error message. (For example like Error: cannot open ${fileName} because...)
I'm using
mock_file@v1.0.1
withsqlite@v3.4.0
on Deno Deploy with the fresh framework. I get this error:Running it locally works fine.
The text was updated successfully, but these errors were encountered: