美文网首页
create-react-app

create-react-app

作者: 秋天de童话 | 来源:发表于2018-08-25 16:40 被阅读19次
npm i -g create-react-app
create-react-app <projectname>

报错

在GET请求资源的时候返回了304重定向到cache。于是我就大胆地猜测一下,cache是不是可能为本地的./npm/cache目录?

react-app创建失败的原因,可能是由于某一次下载或者运行的过程中出了错,导致某些cache文件异常,后来再次执行create-react-app的时候又使用了这些错误的cache文件。

原因分析完毕,于是我尝试删除cache目录,重新跑create-reatp-app,创建成功,至此问题解决!
C:\Users\当前计算机用户名字\AppData\Roaming\npm-cache\ 该文件夹下所有内容后成功。

https://www.cnblogs.com/xueshanshan/p/7920934.html
https://segmentfault.com/q/1010000010632700

npm i react-router react-router-dom -S

相关文章

网友评论

      本文标题:create-react-app

      本文链接:https://www.haomeiwen.com/subject/obuouftx.html