Open ghost opened 9 years ago
Which version of Express Admin you are using? I don't see such expression in \lib\qb\lst.js
on line 42
Version 1.2.6 Sorry. It's on line 43 in the repository. I was already trying to fix it on my own and missed out putting a blank line in again.
Check your settings.json
file, it should be generated and filled with defaults on first start. Your configuration is corrupted for some reason. I can't tell exactly what it is just by looking at this error message.
it seems I get empty req.params in getArgs (listview.js, line 16) which results in more undefineds along the way.
Which version of node do you use? How is your url looking in the browser's address bar, I can't imagine req.params
being empty.
Node is version 0.12.0 The URL looks like this http://192.168.0.2:8080/backend I'm running express-admin in embedded mode.
args = {dpath: "<PATH>",
config: {sqlite: {database: "<PATH>/store.db"}
app: {upload: "<PATH>/uploads"},
root: "/backend",
layouts: true,
themes: true,
languages: true},
settings: require("<PATH>/settings.json"),
custom: {},
users { ... }
};
......
app.use("/backend", admin);
Yeah but in order to get the error in the listview route you have to navigate to something like http://192.168.0.2:8080/backend/[slug] And after login the admin redirects to the mainview, not the listview.
@yhmtg my system tests just hanged on the login screen when using sqlite in node 0.12.
It seems that there is a breaking change in 0.12 that affects the admin, I'll take a look at it this weekend.
@yhmtg it turned out that I needed to re-build my sqlite3 module for node 0.12
Here is what I did
$ nvm use 12 # you use `nvm` right?
$ npm install -g express-admin sqlite3@3.0.5
$ admin /path/to/config
So as far as I'm concerned the admin is working with sqlite and node 0.12
Didn't work for me sadly. Still the same error.
If you can create a small test case that reproduces the bug it will be great. Like a small db with only one table + the config you are using.
I ran into the same problem. I am using an sqlite db without explicitly specified primary keys. Adding "pk": "rowid" to every table in settings.json fixed it for me.
Thanks for the feedback @bnny ! express-admin requires you to have primary keys in your tables. I'm adding rowid to my sqlite tables as well.
Hello,
Same for me like bnny, I'd to add the pk. The generator doesn't detect the pk. Same for the kind of field. If it's date, I'd to change manually in the config for the controller.
Kind regards.
JB.
So I was giving this project a try but as soon as I click that "Login" button it throws an exception. It only does it, when the user and password match with what's in users.json. It does not crash when it was not able to login but shows the login page again as expected.
Anyone experienced the same problem?