uuidjs / uuid

Generate RFC-compliant UUIDs in JavaScript
MIT License
14.65k stars 904 forks source link

[BUG] Module '"uuid"' has no exported member 'v7'.ts(2305) #773

Closed alka7ex closed 4 months ago

alka7ex commented 4 months ago

Before you begin...

Description of the problem

Hi Guys

I got an issues related with types for v7, the functionalities is working fine but it has some types complain stating that

Module '"uuid"' has no exported member 'v7'.ts(2305)

image

Recipe for reproducing

No response

Additional information

No response

Environment

No response

broofa commented 4 months ago

From the Bug Report template:

Failure to provide a Minimal, Complete, and Verifiable example will result in this issue being closed without further review

sir-dunxalot commented 2 months ago

I ran into this issue... Check if other dependencies are using older versions of uuid (e.g. "uuid": "^9.0.1"). You can verify this by searching your package-lock.json for uuid. In my case, an older version of @types/uuid was a dependency and it was creating a version mis-match between uuid, which I had installed and @types/uuid, which was installed by other dependencies (e.g. @azure/core-http). I was able to resolve this issue by manually installing an updated, matching version of @types/uuid (e.g. npm install @types/uuid@10).

broofa commented 2 months ago

FWIW, uuid@beta (uuid@11 prerelease) has built-in TS types, so there should no longer be a need for @types/uuid moving forward.