Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use local database in the desktop in Ionic by Node.js? #7

Open
JeongJun-Lee opened this issue Nov 5, 2017 · 4 comments
Open

Comments

@JeongJun-Lee
Copy link

JeongJun-Lee commented Nov 5, 2017

Thank you for your excellent combination of both Ionic and Electron.
I need to use SQLite3, which is installed at desktop, in Ionic by Node.js. So I installed node modules by "npm install sqlite3 @ types/sqlite3" and coded like below:

image

But, Runtime error comes out like below:
image

Do you have any idea to solve this error? Thank you.

@lohanidamodar
Copy link
Member

If you are viewing this in browser, it will not work, you must view it from electron shell. This error comes only when you try to view it in browser instead of electron shell.

@JeongJun-Lee
Copy link
Author

Thank you for your reply, but in the electron shell also has webpack error like below:

image

@lohanidamodar lohanidamodar reopened this Nov 6, 2017
@lohanidamodar
Copy link
Member

I may be able to help you if I am able to view your code?

@JeongJun-Lee
Copy link
Author

JeongJun-Lee commented Nov 6, 2017

But there is no any additional code except this:
image

If I remove this statement "new SQLite.Database();", the error will be disappeared.
I think Ionic's webpack looks like not parsing sqlite3 node modules normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants