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

Module not found: Error: Can't resolve 'fs' in '.../node_modules/sql.js/dist' #441

Closed
deski-app opened this issue Mar 7, 2021 · 4 comments

Comments

@deski-app
Copy link

Webpack build fails with: Module not found: Error: Can't resolve 'fs' in '.../node_modules/sql.js/dist'

Sql.js version: 1.4.1

@lovasoa
Copy link
Member

lovasoa commented Mar 7, 2021

Hello! Can you give more information? This looks more like a misconfiguration on your side than a bug in sql.js

@deski-app
Copy link
Author

deski-app commented Mar 7, 2021

Not sure what details might be useful. I believe this might be related (other project that seems to depend on sql.js): marcorinck/typeorm-ionic4-test#1 (comment)

It's possible to fool webpack with.
externals: { fs: 'fs', },
Yet the creation of new database with
var db = new SQL.Database();
throws OutOfMemory error.

@lovasoa
Copy link
Member

lovasoa commented Mar 8, 2021

Ok. I don't think your problem is with sql.js itself, but with the code generated by https://github.com/emscripten-core/emscripten

@thanhhai08sk
Copy link

This solved the problem for me: https://stackoverflow.com/a/65490683/5287436

@lovasoa lovasoa closed this as completed Mar 26, 2021
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

3 participants