Unable to generate shortid on node v6.11.1
sean-medullan opened this issue · comments
Sean H commented
The following error is generated:
TypeError: crypto.randomFillSync is not a function
at module.exports (./node_modules/nanoid/random.js:5:10)
at module.exports (./node_modules/nanoid/format.js:35:17)
at generate (./node_modules/shortid/lib/generate.js:14:21)
at build (./node_modules/shortid/lib/build.js:37:17)
at Function.generate (./node_modules/shortid/lib/index.js:53:10)
at Object.<anonymous> (./x.js:2:37)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
I see that nanoid published recently and they have an open issue on that side.
Andrey Sitnik commented
Will be fixed in the next few days.
Quick solution: update to >6.13
Andrey Sitnik commented
The fix was released in nanoid
1.2.5. Update your dependencies.