React-native init 的问题/警告(no-lockfile;connect2.x 系列已弃用;react 具有未满足的对等依赖性) [英] Issues/warnings with React-native init (no-lockfile;connect2.x series is deprecated;react has unmet peer dependency)

查看:125
本文介绍了React-native init 的问题/警告(no-lockfile;connect2.x 系列已弃用;react 具有未满足的对等依赖性)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 react native init 来初始化我的项目,我收到了一些警告,如果我现在不处理它们,我肯定会在后面咬我.粗体是相关消息.我不完全确定如何处理它们,谁能告诉我如何解决这个问题/如果我做错了什么,我收到了这些消息/警告?初学者友好/对术语答案的了解将不胜感激,因为我是本机反应的新手

I am using react native init to initialize my project, and I'm getting some warnings, which I'm sure will come to bite me in the back later on If I don't deal with them now. In bold are the concerning messages. I'm not entirely sure what to do about them, can anyone inform me how to fix this/if I'm doing something wrong that I am receiving these messages/warnings? A beginner friendly/light on the terminology answer would be appreciated, as I'm new to react native

纱线添加 v0.27.5
信息未找到锁定文件.
[1/4] 正在解析包...
警告 react-native > connect@2.30.2:connect 2.x 系列已弃用
[2/4] 正在获取包...
[3/4] 链接依赖...
警告react-native@0.47.2"有未满足的对等依赖react@16.0.0-alpha.12".

yarn add v0.27.5
info No lockfile found.
[1/4] Resolving packages...
warning react-native > connect@2.30.2: connect 2.x series is deprecated
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "react-native@0.47.2" has unmet peer dependency "react@16.0.0-alpha.12".

这个 react-native init 命令也需要很长时间(每次使用约 5 分钟).以上警告是导致启动时间过长,还是其他原因?

This react-native init command is also taking very long (~ 5 minutes per use). Are the above warnings causing the long startup time, or something else?

推荐答案

info 只是一些信息,不是问题

info is just some infomation, not a problem

以及两个警告:

  • 已弃用的连接

    关于不推荐使用的connect版本,我也想出来了,因为react-native依赖connect,react-native最新版本是0.49.3,使用connect@2.30.2,有点过时了,有人做了关于这个问题的公关,Github:pr,但由于一些测试覆盖而没有被合并,所以现在忽略这个警告;
  • 未满足的对等依赖

    它与一些已弃用的软件包有关.
  • deprecated connect

    about the deprecated connect version,I came up with too, it's because react-native depends on connect, and react-native's latest version is 0.49.3, it use connect@2.30.2,a little bit deprecated, and there's someone made a pr about this problem, Github:pr ,but has not been merged because of some test coverage, so now just ignore this warning;
  • unmet peer dependency

    it's related to some deprecated package.

这篇关于React-native init 的问题/警告(no-lockfile;connect2.x 系列已弃用;react 具有未满足的对等依赖性)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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