反应被弹出后如何更新uuid包

how to update the uuid package after react was ejected

我弹出了我的 React 项目,现在当我构建我的项目时,我收到这条消息:

npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

如何更新这个包?我在 package.json

中找不到它

原来你只需要删除 package-lock.json 然后 运行 npm i 这将再次重新安装所有内容。