Comments (13)
This is now fixed in the 2.14.5
. It also solve a problem where sometime internal mongoose fields are considered as regular collection fields.
from forest-express-mongoose.
@arnaudbesnier I have the same error as well.
[email protected]
, [email protected]
an [email protected]
from forest-express-mongoose.
Hi everybody, I'm on it.
The problem is with the last versions of mongoose, it seems to work with "mongoose": "5.2.16".
The problem sould be fixed soon.
from forest-express-mongoose.
Thank you so much Arnaud! ghat worked
from forest-express-mongoose.
Hi @roopakv, this is definitely an unexpected error.
In order to have more context and help you us identify what could happen can you provide a few more details:
- Did you follow the setup steps as described in the documentation/onboarding pages?
- Did you do some more actions?
- Do you have a lot of Mongoose schemas or specific schemas with a very large/complex/deep schema?
I imagine that this exception is due to some specific schemas but we need to identify them to go deeper.
We have several way to investigate on this:
- You can try to reduce the number of schema declared in your
modelsDir
to isolate the model(s) that raise the error. - Even simpler you can use an undocumented property
includedModels
that makes the agent do the introspection only on the declared models. Something like:
app.use(require('forest-express-mongoose').init({
modelsDir: __dirname + '/models',
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
mongoose: require('mongoose') // The database connection.
includedModels: ['customers', 'purchases', ...] // To replace with your own schema names
}));
should work if you mongoose schema are defined before the liana init code.
from forest-express-mongoose.
Sorry i was out for a couple of days.
- Did you follow the setup steps as described in the documentation/onboarding pages?
- Yes
- Did you do some more actions?
- No
- Do you have a lot of Mongoose schemas or specific schemas with a very large/complex/deep schema?
- Big yes
Let me look into finding the model with a problem and get back to you folks. We are working to hit a deadline so expect me to get back to you toward the end of the week.
Also is there anyway we can use lumber with mongodb? or any solution where we keep our data instead of pushing it to your servers? basically a hosted solution?
from forest-express-mongoose.
So I did some work around this.
-> even if I use includedModels since all models are already loaded into mongoose, the above error is thrown. It seems to be a problem in forest-express
.
Is there an easy way to load model by model rather than with forest-express-mongoose
from forest-express-mongoose.
Hi @roopakv, As I said in my previous comment, the other way to investigate is to remove all your schema declaration files and re-add them progressively to isolate the schemas that generate such error.
from forest-express-mongoose.
@arnaudbesnier I've got the same error, with a dead simple setup: only 1 model with 1 Boolean field (also tested with 1 String field and got the same error).
I tested with a few recent versions of express, mongoose and this package.
Including: [email protected]
, [email protected]
and [email protected]
from forest-express-mongoose.
Hi @roopakv, @saintmac, @bguivarch,
The issue is fixed in the version 2.14.2
.
You can do:
npm install forest-express-mongoose@latest
or
yarn add forest-express-mongoose@latest
from forest-express-mongoose.
Working for me as well, thanks!
from forest-express-mongoose.
Sorry guys, we had to release a version 2.14.4
of forest-express-mongoose
with the patch for this issue reverted. It was causing some troubles with the embedded documents.
So the recommendations for now are the following:
- Use the version
2.14.4
withmongoose
<=5.2.*
- Use the version
2.14.2
or2.14.3
if you really need to use the latest version of mongoose, but you may have troubles with subdocuments
I'm currently working on a definitive fix. I'll keep you posted.
from forest-express-mongoose.
Thank you for the update. it seems like 2.14.4 with mongoose 5.2.14 doesnt seem to work for us.
Looking forward to see what fix you have planned
from forest-express-mongoose.
Related Issues (20)
- TypeError: Class constructor ObjectId cannot be invoked without 'new' HOT 4
- export ResourceSerializer in type definition
- Forest Admin UI incorrectly display nested field HOT 2
- Smart Ations fields hooks endpoint cannot authenticate HOT 5
- Is this still supported? HOT 2
- Update document example from documentation doesn't seem to work HOT 1
- TypeError: RecordsRemover is not a constructor HOT 3
- Forest Admin Dashboard display mongoose mixed data type as [object,object]
- Forestadmin with Typescript project and MongoDB Atlas Free Plan
- Should be able to specify location of .forestadmin-schema.json HOT 1
- Non-Date types that store Date values cannot be rendered as a time-based Chart HOT 1
- Nested Enum types do not have values in the schema and crash the Create page in the UI HOT 7
- Smart relationship does not query the route HOT 4
- Smart actions - primaryKeys not generated in forestadmin schema HOT 2
- Smart Relationships are all empty in 7.8.4 and after
- Weird behaviour with certain model names HOT 1
- Having trouble connecting HOT 2
- Impossible to delete values in array field
- Can't user react components for smart views
- Vulnerability Notice on moment-timezone. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forest-express-mongoose.