hackmdio / hackmdio/codimd

manage_users tries to use SQLite even if postgres is set up (actually an env var mishap)

Open
#1,280 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.1k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

trying to add an user to a hosted codimd with registration disabled, but it gives me an sqlite error:

```
erin@localhost /s/c/server> bin/manage_users --pass fakepass --add fake@example.com
(node:10680) UnhandledPromiseRejectionWarning: SequelizeDatabaseError: SQLITE_ERROR: no such table: Users
at Query.formatError (/srv/codimd/server/node_modules/sequelize/lib/dialects/sqlite/query.js:419:16)
at Query._handleQueryResponse (/srv/codimd/server/node_modules/sequelize/lib/dialects/sqlite/query.js:73:18)
at afterExecute (/srv/codimd/server/node_modules/sequelize/lib/dialects/sqlite/query.js:247:31)
at Statement.errBack (/srv/codimd/server/node_modules/sqlite3/lib/sqlite3.js:16:21)
(node:10680) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10680) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```

i have the postgres db set up in `config.json` and `.sequelizerc` properly, the web interface works fine and i was able to register an user if i re-enabled email registration, but not through the command line.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.