[英]How to fix Error in installing "react-router-dom?
安装 react-router-dom 时出错。
D:\react\routeingreact>npm i react-router-dom
npm ERR! Cannot read property 'match' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\5442\AppData\Roaming\npm-cache\_logs\2020-04-01T05_06_17_337Z-debug.log
您正在尝试安装错误的软件包。 没有包router-react-dom
。 您正在寻找react-router-dom 。 您在安装命令中混淆了单词react
和router
的顺序。 正确的安装命令是:
npm install react-router-dom
我还建议您查看react-router-dom
入门指南。
希望这有帮助!
您需要删除一个文件和一个目录:
你应该让你回到正轨
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.