Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript errors #19

Closed
tobi-or-not opened this issue May 12, 2018 · 3 comments
Closed

Typescript errors #19

tobi-or-not opened this issue May 12, 2018 · 3 comments

Comments

@tobi-or-not
Copy link

Hi,

I pulled the npm package (version 1.2.3) into an Angular 5 project, using typescript. When I try to build the project I get two errors:

ERROR in node_modules/bson-objectid/objectid.d.ts(20,25): error TS2304: Cannot find name 'Buffer'.

src/app/term.service.ts(7,10): error TS2305: Module '"<path>/node_modules/bson-objectid/objectid"' has no exported member 'ObjectID'.

Does anyone know why this might happen and how to solve that problem?

@wendellmva
Copy link
Contributor

wendellmva commented May 30, 2018

@williamkapke @tobi-or-not Node has refactored Buffer into it's own namespace so, in the objectid.d.ts file of the package this must be included for this error to go away 'import {Buffer} from 'buffer'; since buffer is now orphaned in that file.

@williamkapke
Copy link
Collaborator

This should be fixed by #20 now? Please reopen if not.

Thanks!

@stherrienaspnet
Copy link

stherrienaspnet commented Sep 28, 2018

"bson-objectid": "^1.2.3"
node_modules/bson-objectid/objectid.d.ts(21,25): error TS2304: Cannot find name 'Buffer'.
I'm facing the same issue, is it suposed to be fixed in the current version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants