Reputation: 53
I am using mongo-seeding version 3.3 . When i am trying to build the project it is giving me below error
[email protected] serve /app npm run build && tsc && node lib/server.js [email protected] build /app babel src --out-dir lib --extensions ".ts,.tsx" Successfully compiled 85 files with Babel. node_modules/mongo-seeding/dist/database/database.d.ts(19,94): error TS2314: Generic type 'InsertWriteOpResult' requires 1 type argument(s).
One day ago everything was working fine . Without modifying any code i started to get this error. I think it is saying we have to pass default type in Tschema.
I have tried to degrade library version but didn't work
Upvotes: 2
Views: 838
Reputation: 53
It indicates there is some dependency error. Check If you are using the right and same version of mongoose in package.json and package-lock.json.
I resolved this issue by updating version of mongoose in both files.
Upvotes: 1
Reputation: 827
The issue is due to updating the MongoDB library internally used by mongo-seed. Please try to install the right version required by the mongo-seed of MongoDB or try to build the exact dependency tree. For this, you may try to use the exact version of the library.
Upvotes: 2