Search code examples
node.jsmongodbtypescriptseeding

Getting error Generic type 'InsertWriteOpResult<TSchema>' requires 1 type argument(s) in mongoseeding libraray


I am using mongo-seeding version 3.3 . When i am trying to build the project it is giving me below error

node_ts@1.0.0 serve /app npm run build && tsc && node lib/server.js node_ts@1.0.0 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


Solution

  • 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.