[英]./src/index.js Module not found: Can't resolve 'react-dom/client' in "c:\users\....."
Above is the code of the index.js file, below is the error shown in this file上面是 index.js 文件的代码,下面是这个文件中显示的错误
I have tried solving this error in many ways, I have also updated the React and React DOM to version "react": "^18.0.0-rc.0", "react-dom": "^18.0.0-rc.0".我已尝试通过多种方式解决此错误,我还将 React 和 React DOM 更新为版本“react”:“^18.0.0-rc.0”,“react-dom”:“^18.0.0-rc. 0”。 I also tried deleting the node modules and re-installing node modules.
我还尝试删除节点模块并重新安装节点模块。 Waiting for solutions.
等待解决方案。 Also not able to understand these Chokidar errors.
也无法理解这些 Chokidar 错误。
Try installing both react and react dom to latest stable v18 builds尝试将 react 和 react dom 安装到最新的稳定 v18 版本
npm i react@latest react-dom@latest
Additionally there's an error in your console about files being locked.此外,您的控制台中存在有关文件被锁定的错误。 Did you update the dependencies while the client was still running?
您是否在客户端仍在运行时更新了依赖项?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.