@types/uuid references @types/node
See original GitHub issueUnfortunately I’m trying to use this library with Typescript, so I need to use @types/uuid
, but that contains a reference to Buffer
in globals.d.ts
which means it pulls in @types/node
, which breaks my build. I’m writing code for browsers, not node.
There would be a few possible fixes for this, including just removing the reference to Buffer
and just using Array
/ ArrayLike
- or creating an interface for Buffer
instead of pulling in the one from node…
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
@types/uuid - npm
Start using @types/uuid in your project by running `npm i @types/uuid`. There are 3615 other projects in the npm registry using @types/uuid.
Read more >@types/node-uuid | Yarn - Package Manager
This package contains type definitions for node-uuid.js (https://github.com/broofa/node-uuid). Details. Files were exported from https://github.
Read more >Microsoft/TypeScript - Gitter
I should have to specify "types": [ "uuid" ] for that to work ... I think the problem is that @types/uuid shouldn't reference...
Read more >visual studio / typescript typings errors - Stack Overflow
answer is: "Under the covers, we run the TypeScript compiler as a task. The command we use is: tsc -p ." I run...
Read more >Generate unique id typescript - Caritas Castellaneta
Reference id format for Direct Debit Payments The format of reference_id will ... in list components. ts file, run npm to install the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh that would be excellent 😃
So the problem for me is purely in the DefinitelyTyped
@types/uuid
definition from what I can tell. Inside that type it pulls in a reference to @types/node, because ofBuffer
- which is located in the node globals.d.ts.But as I’m doing browser development (not making a node app) I can’t use anything from here, and the presence of those types breaks things like
setTimeout
(makes its return typeNodeJS.Timer
instead ofnumber
).This is a problem that has come up a few times before in other projects, and it’s one of the pains of the ecosystem 😦 It normally just requires someone to sort of the types to remove that dependency.
Let me know if you need any more info, and thank you for the reply!
@types/uuid@7.0.0
has finally been released and should fix this issue. Feel free to create a new issue if you feel that this problem has not been solved yet.