无法使用 react-native init 创建项目 [英] can't create project using react-native init

查看:50
本文介绍了无法使用 react-native init 创建项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 react-native init 创建新项目时,我一次又一次地收到此错误.我重新安装了 react-native cli 并再次尝试,但没有运气.有人可以告诉我有什么我可以做的吗?

I am getting this error again and again when creating a new project using react-native init. I reinstalled react-native cli and tried again but no luck. Can someone please tell me is there anything I can do?

我安装了以下版本反应原生cli:2.0.1反应原生:0.56.0节点:10.6.0npm: 6.1.0

I have following versions installed react-native-cli: 2.0.1 react-native: 0.56.0 node: 10.6.0 npm: 6.1.0

推荐答案

此问题一行代码解决

$ react-native init [projectName] --version react-native@0.55.4

这样做的目的是您明确告诉您希望使用此指定版本创建项目

what this does is that you explicitly tell that you want your project to be created with this specify version

这篇关于无法使用 react-native init 创建项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆