Questions tagged [nanoid]

21 questions
0
votes
0 answers

Package subpath './index.cjs' is not defined by \"exports\" in /var/task/node_modules/nanoid/package.json in AWS Lambda (nanoid)

My NodeJS Lambda is failing with this error while trying to use nanoid or uuid: { "error": "Error", "cause": { "errorType": "Error", "errorMessage": "Package subpath './index.cjs' is not defined by \"exports\" in…
ChumiestBucket
  • 868
  • 4
  • 22
  • 51
0
votes
1 answer

Is using an UUID four times for length 4 the same as one time for length 16?

My case is this, I need to offer people a one time code that they can use to login. These people are not tech literate. They need to be offered a human readable code. The format is something along the lines of this; ACBE-adK3-SdLK-K23J a set of 4…
Eloque
  • 311
  • 2
  • 10
0
votes
1 answer

Using Node shortid / nanoid and checking for collisions in DB

I am working on a self-education project building a URL shortener in Node. I was going to use shortid, but that's been deprecated so I switched to nanoid. My concern is the eventual possibility of a collision with a generated ID and an existing ID…
0pt1m1z3
  • 841
  • 3
  • 12
  • 23
0
votes
1 answer

Do repeated program executions increase chance of unique ID collisions

I know the point of unique id generators like UUID and nanoid is that collisions aren't supposed to happen for a very, very long time. But would subsequent re-executions of a program increase the chances? Example: (I don't know much about RNG or…
Adnan Zaman
  • 109
  • 1
  • 2
  • 9
-1
votes
1 answer

Generate unique string ID with nanoid

I'm using nanoid to generate a unique string ID. I have some questions. 1- When I limit size is the outcome unique? const nanoid = nanoid(6) 2- I do not want some letters such as (- and _ ) in the result. How can I do that and dose the outcome is…
AR Second
  • 582
  • 1
  • 6
  • 25
-1
votes
1 answer

How to import nanoid package from npm to Laravels?

I will use unique number using nanoid package from nodejs to laravels, but i get error this. this is mycontroller.
1
2