Ant-design-pro: 🐛[BUG] 登录页面出现错误_form.default.create(...) is not a function

Created on 31 Jan 2020  ·  4Comments  ·  Source: ant-design/ant-design-pro

🐛 bug 描述

npm run fetch:blocks后刷新登录页出现报错

Unhandled Rejection (TypeError): _form.default.create(...) is not a function
./src/pages/user/login/components/Login/index.tsx
src/pages/user/login/components/Login/index.tsx:161

📷 复现步骤

umi安装antd pro后再运行npm run fetch:blocksnpm start,打开页面后再退出登录,接着刷新

🏞 期望结果

与初始安装后一样的正常登录页

💻 复现代码

© 版本信息

  • Ant Design Pro 版本: [4.11]
  • umi 版本 [2.13]
  • 浏览器环境 [chrome]
  • 开发环境 [emac OS]

🚑 其他信息

截屏2020-02-01上午3 04 49

🛑 bug

Most helpful comment

我也遇到同样问题,最后解决了。

  1. yarn add @ant-design/compatible
  2. 把原来的
    import {Form} from 'antd';
    改成
    import { Form } from '@ant-design/compatible'

All 4 comments

是不是没有安装 @ant-design/compatible ?

@xiaohuoni 是的。。。

I have the same issue here.. @lichnow , what was your solution for this?

我这里有同样的问题.. @lichnow ,您对此有何解决方案?

我也遇到同样问题,最后解决了。

  1. yarn add @ant-design/compatible
  2. 把原来的
    import {Form} from 'antd';
    改成
    import { Form } from '@ant-design/compatible'
Was this page helpful?
0 / 5 - 0 ratings

Related issues

952425340 picture 952425340  ·  3Comments

cheung1111 picture cheung1111  ·  3Comments

renyi818 picture renyi818  ·  3Comments

2uncle-code picture 2uncle-code  ·  3Comments

RichardStark picture RichardStark  ·  3Comments