microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.31k stars 2.77k forks source link

bson has no exported member Int32 #174

Closed gregbown closed 5 years ago

gregbown commented 5 years ago

Trying to build throws the error

node_modules/@types/connect-mongo/node_modules/@types/mongodb/index.d.ts(24,45): error TS2305: Module '"C:/.../node_modules/@types/bson/index"' has no exported member 'Int32'.

Installing @types/bson 1.0.11 resolves the error

Windows 10 pro Node 10.15.0 TypeScript 2.7

peterblazejewicz commented 5 years ago

This should be fixed in updated deps as the @types/mongodb dependency supports this already: https://github.com/DefinitelyTyped/DefinitelyTyped/commit/43de02ea1d87534427c0b1ae95e13a26d11e4e42#diff-c4368217c3da6217f635d632d0bd4c87 If the problem persists:

npm install --no-cache