Version 8.1 won't load using legacy require('uuid/v4')
See original GitHub issueFor some reason the v4.js ,v3.js etc files were removed (in 8.x?) and now code that’s worked fine for a long time no longer works because it was written before const { v4: uuidv4 } = require('uuid');
was a thing and require('uuid/v4')
was the way to do it. And its not like I can just go though 300+ files in multiple projects and just change it oh and some of this still needs to run on older versions of node due to circumstances out of my control. And yes I can just lock down the version to 7.x but in a large development group just tweaking a global file like package.json requires sign off etc. and all the while builds are halted while we go on a fire drill so please realize you’re not in a bubble and willy nilly remove stuff because its old or whatever.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
I would say that this is never a good idea. With the same logic, you could have thought that “the module was so simple so it will never have a breaking change”, and thus you could have pinned it at
^1.0.0
…The fix here is simple, never use
"*"
for your dependencies, as that will introduce the kinds of problem that you posted about. That goes for all dependencies…