Open charbelsako opened 1 week ago
What's in list.js
line 49? It seems you've shared a different component
What's in
list.js
line 49? It seems you've shared a different component
I don't have a file called list.js
I think it's a file inside adminjs?
Does your table have a primary key?
Does your table have a primary key?
You mean in the schema, this is my schema
import mongoose from 'mongoose';
const staticDataSchema = mongoose.Schema({
_id: { type: Number },
name: { type: String },
type: { type: String },
category: { type: String },
data: {},
}, {
collection: 'staticdata',
});
export const StaticData = mongoose.model('staticdata', staticDataSchema);
In my main application I use _id
as a number, but in my adminjs this is my schema
How would I add a primary key?
Downgraded version node.js from 18.17.1
to 16.20.1
and now the error is gone
Contact Details
charbelsako@gmail.com
What happened?
I just created an authenticated route but every time I log in to see the data it shows the above error. keep in mind I can see other data just not this model (staticdata)
I expect it to show me a list of data that I requested
Bug prevalence
I'm the only person encountering it and it's consistent
AdminJS dependencies version
What browsers do you see the problem on?
Firefox
Relevant log output
Relevant code that's giving you issues
this is the component to show the list
this is app.js and finally this is the component loader