Closed osagga closed 6 years ago
This has to do with the mongo version change, should be an easy fix
So I tried adding useNewUrlParser
to the connect call as follows:
return MongoClient.connect(
connectUrl,
{
keepAlive: 1,
poolSize: config.maxPoolSize,
useNewUrlParser: true
/*
*nativeParser: true
*/
}
);
But it throws this runtime error
src/services/storage.ts(36,13): error TS2345: Argument of type '{ keepAlive: number; poolSize: number; useNewUrlParser: boolean; }' is not assignable to parameter of type 'MongoClientOptions | undefined'.
Object literal may only specify known properties, and 'useNewUrlParser' does not exist in type 'MongoClientOptions | undefined'.
I'm not really sure if there's a problem with the mongodb package or something else?
That's a typings error, try updating package.json to have @types/mongodb: 3.1.3,
May fix it, I'm checking now
That MR should fix at least the mongo error. Will test the generate blocks issue with this await change and see if it affects it.
I'll test it out and keep you updated, thanks!
When running a clean install of bitcore v8, the log shows the following warning
I'm using the required node version