本文介绍了“react-native eject":无法识别的命令“eject"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的 react-native 项目重新创建 ios 和 android 文件夹.据我所知,这是通过以下命令完成的:

I am trying to recreate ios and android folders for my react-native project. As far as I know this is done with the command:

react-native eject

但我收到错误:

error Unrecognized command "eject".

我做错了什么?我应该如何重新创建 android 和 ios 文件夹?

I am doing something wrong? How should I recreate android and ios folders?

react-native-cli: 2.0.1

react-native-cli: 2.0.1

推荐答案

它在 0.59.9 中确实有效.在我升级到 0.60 后,今天早上这也让我感到震惊.显然你现在必须运行 react-native upgrade --legacy true.react-native 弹出 恕我直言要容易得多.

It did work in 0.59.9. This threw me too this morning after I upgraded to 0.60. Apparently you now have to run react-native upgrade --legacy true. react-native eject was much easier IMHO.

这篇关于“react-native eject":无法识别的命令“eject"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 15:10