When using the node:sqlite module in the backend of an Electron project, Vite outputs: Error: Module 'node:sqlite' has been externalized for browser compatibility. #19278
Unanswered
XunJiJiang
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the node:sqlite module in the main process of an Electron project, which causes Vite to output the following error:
However, using other Node modules does not cause any issues.
Here is the content of the vite.config:
The module using node:sqlite is referenced in the electron/main/main.ts section:
I’m not sure if the issue is with my configuration or because the node:sqlite module is relatively new.
Beta Was this translation helpful? Give feedback.
All reactions