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
Hi,
I'll try to make test on my enviorment and I found a issue.
My enviorment is composed by vite\vitest, Electron and Better-Sqlite3.
Sqlite is native module so need to be compiled. For using Sqlite with Electron you need to compile with Electron's Node version. But this version of Node is not the same installed globaly. This mean that the test of SQLite fail. There is a way to force ELECTRON_RUN_AS_NODE and then run the test using this. So in a CMD (windows) you can:
set ELECTRON_RUN_AS_NODE=true
in order to set the enviorment and then run:
node_modules.bin\electron node_modules\vitest\vitest.mjs --config config\vitest.config.js
the problem is that the output is:
if you run the command:
node node_modules\vitest\vitest.mjs --config config\vitest.config.js
The output is good. Any idea to how to resolve it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'll try to make test on my enviorment and I found a issue.
My enviorment is composed by vite\vitest, Electron and Better-Sqlite3.
Sqlite is native module so need to be compiled. For using Sqlite with Electron you need to compile with Electron's Node version. But this version of Node is not the same installed globaly. This mean that the test of SQLite fail. There is a way to force ELECTRON_RUN_AS_NODE and then run the test using this. So in a CMD (windows) you can:
set ELECTRON_RUN_AS_NODE=true
in order to set the enviorment and then run:
node_modules.bin\electron node_modules\vitest\vitest.mjs --config config\vitest.config.js
the problem is that the output is:
if you run the command:
node node_modules\vitest\vitest.mjs --config config\vitest.config.js
The output is good. Any idea to how to resolve it?
Beta Was this translation helpful? Give feedback.
All reactions