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

Unable to use library in Cloud Functions #5

Open
justindh opened this issue Apr 5, 2020 · 2 comments
Open

Unable to use library in Cloud Functions #5

justindh opened this issue Apr 5, 2020 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@justindh
Copy link

justindh commented Apr 5, 2020

When using services like GoogleCloud, Firebase, Aws and etc the code is run in a diskless or a readonly disk mode which means that this library returns errors such as this

Detailed stack trace: Error: EROFS: read-only file system, mkdir './esiil_db/' at Object.fs.mkdirSync (fs.js:885:18) at new SQLEngine (/srv/node_modules/esiil/libs/Database.js:13:10) at new ESIIL (/srv/node_modules/esiil/index.js:31:15) at init (/srv/node_modules/esiil/index.js:116:10) at Object.<anonymous> (/srv/index.js:8:17) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)

@karnthis
Copy link
Owner

karnthis commented Apr 5, 2020

@justindh Thanks for reporting this. ESIIL relies on a SQLite database to manage and store user sessions, which is failing due to the diskless nature. There are a couple of solutions that would address this, one would be allowing connection to a separate mysql/postgres database, or another would be storing everything in session memory. I will have to consider these and determine how I want to proceed.

@karnthis karnthis self-assigned this Apr 5, 2020
@karnthis karnthis added bug Something isn't working enhancement New feature or request labels Apr 5, 2020
@karnthis
Copy link
Owner

@justindh I have a beta build npm install esiil@beta to give a try. I am not very familiar with using Firebase and similar so I relying on you to be my guinea pig in this. If you want to talk more directly, I have a Slack here, otherwise this issue is a perfect place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants