ant-design / ant-design-pro

👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
https://pro.ant.design
MIT License
36.35k stars 8.14k forks source link

新项目git后运行报警告LocaleProvider is deprecated. #5014

Closed lonelyant closed 5 years ago

lonelyant commented 5 years ago

Warning: [antd: LocaleProvider]LocaleProvideris deprecated. Please uselocalewithConfigProviderinstead: http://u.ant.design/locale

语言选用的是js

搜索了一下,好像用到LocaleProvider的地方只有src/pages/.umi/LocaleWrapper.jsx,官方建议是.umi文件下不能修改,那这个应该怎么解决呢?

chenshuai2144 commented 5 years ago

这是个 warning ,你可以暂时忽略,会在 umi-locale 中做修改

kele527 commented 5 years ago

这是个 warning ,你可以暂时忽略,会在 umi-locale 中做修改

是你们改,还是自己改?

zhaoy0221 commented 5 years ago

记录位置,接收更新通知

LuzMariaa commented 5 years ago

此外,除了这个错误还有一堆这个warning “react-dom.development.js:11495 Warning: componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-async-component-lifecycle-hooks for details.

Please update the following components: ConnectedRouter, Route, Router, Switch”

点击侧边栏的时候:报这个“ Warning: pro-layout: onCollapse and collapsed should exist simultaneously” @chenshuai2144 (语言选的 typescript)

hoosin commented 5 years ago

@LuzMariaa 这个是因为官方不推荐使用 componentWillMount

chenshuai2144 commented 5 years ago

look https://github.com/umijs/umi/pull/2941

ycjcl868 commented 5 years ago

同时也需要兼容 3.21.0 之前的版本

dellyoung commented 5 years ago

遇到了同样的问题,好像官方还是没修复好

zhipingzhang commented 5 years ago

请问好了吗,我umi更新到了最新版,还是不行,还有那一堆componentWillMount has been renamed的警告。

ycjcl868 commented 5 years ago

umi 发个新版就 ok 了。

zhipingzhang commented 5 years ago

@ycjcl868 您好,我清理后重新install,然后使用 umi dev 启动,还是同样的警告,lock文件中我看umi依赖已经是最新版了

umi@^2.8.7:
  version "2.8.18"
umi-plugin-locale@2.9.11:
  version "2.9.11"

补充一下:我是之前用yarn create umi 创建的antd pro项目,install是用的yarn

ZylFrank commented 5 years ago

相同的问题clone的最新版项目启动时1个error6个warning

图片

umi 为2.8.18版本:

图片
qiantaobao commented 5 years ago

同样的问题,请尽快修复吧,不然开发真的很不方便啊

ycjcl868 commented 5 years ago

locale 问题已修复,升级到 2.8.19

ycjcl868 commented 5 years ago

有些组件使用了将废弃的 react api,@chenshuai2144 cc

chenshuai2144 commented 5 years ago

@ycjcl868 不是我们的,是第三方的,16 的时候我们已经清理过了。 社区需要反应一段时间

silent-tan commented 5 years ago

marked

afc163 commented 5 years ago

Fixed in lastest umi version.

Lind-pro commented 5 years ago

Fixed in lastest umi version.

今天使用了umi 2.8.20 还是有这一堆警告哎。。我看了看了2.8.20是最后一个版本啊 image

wangxingkang commented 5 years ago

react 的警告

txp1035 commented 5 years ago

react生命周期即将废弃的警告

ruomanwei commented 5 years ago

所以现在最新版本更新了就好了是吗

wangxingkang commented 5 years ago

试一下 不就行了 説是解决了

lonelyant commented 5 years ago

umi 2.9.3 版本warning依然存在

wangxingkang commented 5 years ago

升级下 ant-design 呢

lonelyant commented 5 years ago

升级下 ant-design 呢

antd: 3.23.1
umi: 2.9.3

依然存在

ycjcl868 commented 5 years ago

LocaleProvider 的解决了,其它⚠️警告处理需要一步步来修掉。 https://github.com/umijs/umi/pull/2993

fishenal commented 5 years ago

antd组件的报错,可以通过指定react和react-dom版本来解决,

"react": "16.8.6",
"react-dom": "16.8.6",

等antd4上线再改成可变版本吧

lyihuan commented 5 years ago

这种warning问题解决了吗????

tnduc commented 4 years ago

Screenshot from 2019-10-23 08-42-03

wangyinwei1 commented 4 years ago

哪个版本解决了?我也是一堆告警