tndrle / node-sqlite3-wasm

WebAssembly port of SQLite3 for Node.js with file system access
MIT License
55 stars 8 forks source link

Electron esm module error #70

Open gsxhnd opened 1 month ago

gsxhnd commented 1 month ago

I use esbuild to build main.ts to main.js, electron with "type":"modules" in package.json ,esbuild format is "esm"

Then run electron will be error: Error: Dynamic require of "node:path" is not supported

Maybe error line is here https://github.com/tndrle/node-sqlite3-wasm/blob/7c43d7337af2bacd29b0012960aa174a6216fe71/src/vfs-pre.js#L25-L29

gsxhnd commented 1 month ago

Make version to 7.1 and format to cjs, it can be work.