执行create-react-app报错:Could not install from "XXpath" as it does not contain

本文链接:https://www.cnblogs.com/chenzhihong294/p/14257288.html


 

Problem:

学习react时npx执行create-react-app报错


后面发现是路径问题,node的路径下带有了空格,如图

执行create-react-app报错:Could not install from "XXpath" as it does not contain

 

 

 在Program和Files中间有一个空格。

此时,cmd执行

npm config get cache

将路径中的空格用‘~’代替,如下图:

执行create-react-app报错:Could not install from "XXpath" as it does not contain

 

 搞定之后就可以正常执行啦!

执行create-react-app报错:Could not install from "XXpath" as it does not contain

 


另:React安装教程可见该博主的帖子:https://blog.csdn.net/weixin_36732046/article/details/95884577

执行create-react-app报错:Could not install from "XXpath" as it does not contain

上一篇:解决Mybatis 异常:A query was run and no Result Maps were found for the Mapped Statement 'xingzhi.dao.music.ISong.GetSongTotal'


下一篇:CardMapper is not known to the MapperRegistry.