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
when running locally, or setting an absolute path like database: 'C:\aaaa\db.db' all is working, while running from a mounted iso, so D: is readonly and database in D:\db.db , i'm getting: Error: EPERM: operation not permitted, mkdir 'D:\'
just for reference in these issue similar issues are getting managed #628 #640
I was unable to reproduce this on Windows 11 on a forced-read-only drive:
Mount USB disk to D:\
constbs=require("better-sqlite3");constdb=bs("D:\\test.sqlite3");db.exec("create table t (id INTEGER)");db.prepare("insert into t(id) values (1),(2),(3)").run();db.close();
You're getting an EPERM from mkdir. The line you referenced only checks for the existence of the directory using stat--it's not doing a mkdir.
Please open an issue on your ORM, or just run your code in your debugger and trap the exception--it should point you right at the codepath you're fighting.
Thanks for the hint, i'll try to give a more consistent test case... in the meantime i've also found this node issue that seems related nodejs/node#38347
i'm trying to embed a typeorm app with sqlite db in an ISO:
Basically the conf is:
when running locally, or setting an absolute path like database: 'C:\aaaa\db.db' all is working, while running from a mounted iso, so D: is readonly and database in
D:\db.db
, i'm getting:Error: EPERM: operation not permitted, mkdir 'D:\'
just for reference in these issue similar issues are getting managed
#628
#640
maybe the issue is "just" this line that is trying to check if the folder exists
https://github.com/WiseLibs/better-sqlite3/blob/master/lib/database.js#L64
The text was updated successfully, but these errors were encountered: