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

Generated IDs are not unique on node 15 #239

Closed
achingbrain opened this issue Oct 21, 2020 · 2 comments
Closed

Generated IDs are not unique on node 15 #239

achingbrain opened this issue Oct 21, 2020 · 2 comments

Comments

@achingbrain
Copy link

$ nvm use 15
Now using node v15.0.0 (npm v7.0.2)
$ node
Welcome to Node.js v15.0.0.
Type ".help" for more information.
> const { nanoid } = require('nanoid')
undefined
> nanoid()
'MMMMMMMMMMMMMMMMMMMMM'
> nanoid()
'MMMMMMMMMMMMMMMMMMMMM'
> nanoid()
'MMMMMMMMMMMMMMMMMMMMM'

vs:

$ nvm use 14
Now using node v14.8.0 (npm v6.14.7)
$ node
Welcome to Node.js v14.8.0.
Type ".help" for more information.
> const { nanoid } = require('nanoid')
undefined
> nanoid()
'cpXer-cKMjpSQb0Z-QVdB'
> nanoid()
'x2te4a1opck7jTwTQJ5yM'
> nanoid()
'LuRbeveO1xJXgl3A6n5Of'
@achingbrain
Copy link
Author

I think this might have just been fixed in node nodejs/node#35722

@ai
Copy link
Owner

ai commented Oct 21, 2020

Yeap. It is Node.js 15 bug. I hope to see the fix soon.

@ai ai closed this as completed Oct 21, 2020
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

2 participants