uuidjs / uuid

Generate RFC-compliant UUIDs in JavaScript
MIT License
14.61k stars 901 forks source link

README says uuid@11 has been published (including types), but latest version on NPM is uuid@10 (doesn't include types) #787

Closed aoor9 closed 2 months ago

aoor9 commented 2 months ago

Even though this project is now built with typescript, I get this error when I use it on my node app:

Could not find a declaration file for module 'uuid'. './app/node_modules/uuid/dist/esm-browser/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/uuid` if it exists or add a new declaration (.d.ts) file containing `declare module 'uuid';`ts(7016)

This fix exports types declaration from package.json.

broofa commented 2 months ago

Sorry, uuid@11 has not actually been published yet. It's still a work in progress, and uuid@10 (the latest version) doesn't have types included with it yet. So, for now, you still need to npm install @types/uuid despite what the README says.

Sorry about that! I expect to have v11 published in the next 1-2 weeks, and you should be good to go then.