[英]I can't create a react-native project?
You have to install react native cli in global. 您必须在global中安装react native cli。 You can use this to do that
你可以用它来做
npm install react-native-cli -g
I was having a lot of trouble with this, as none of the other answers provided were working. 我遇到了很多麻烦,因为提供的其他答案都没有用。 The top answer here was what allowed me to get through my problem: npm global path prefix .
最好的答案是让我解决问题的方法: npm global path prefix 。
If you get a subsequent EACCES permissions problem, use this so as to not having to go back to square one to fiddle with the npm default directory again: 如果遇到后续的EACCES权限问题,请使用此方法,以免再次回到npm默认目录的位置:
sudo npm install -g --unsafe-perm=true --allow-root
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.