React: Deep requiring is deprecated as of uuid, Please require the top-level module
This has changed after recent update to library and now you may import uuid, as per library description :
"As of uuid@7 this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the import"
import { v4 as uuid_v4 } from "uuid";
uuid_v4()
... or for CommonJS:
const { v4: uuid_v4 } = require('uuid');
uuid_v4();