Ant-design-pro: 创建最新的 ant design pro 项目后 Mock 服务一直报错 🐛[BUG]

Created on 10 Apr 2020  ·  1Comment  ·  Source: ant-design/ant-design-pro

🐛 bug 描述

2020.4.10 用命令行创建 ant design pro 项目后,mock 服务一起报错,无法正常使用。

/api/login/account 接口返回的数据:

<html>
<head><title>405 Not Allowed</title></head>
<body bgcolor="white">
<center><h1>405 Not Allowed</h1></center>
</body>
</html>

📷 复现步骤

使用 dev 命令运行项目就会出现上述情况;
使用 start 命令运行项目就没问题。

© 版本信息

  • Ant Design Pro 版本

    • "@ant-design/icons": "^4.0.0"

    • "@ant-design/pro-layout": "^5.0.8"

    • "@ant-design/pro-table": "^2.2.0"

    • "@ant-design/pro-cli": "^1.0.18"

  • umi 版本 3.1.0
  • 浏览器环境 Chrome
  • 开发环境 [Windows]
  • nodejs: 12.14
  • npm: 6.13.4
🛑 bug

Most helpful comment

才看到使用 dev 运行的是 cross-env REACT_APP_ENV=dev MOCK=none umi dev,其中 Mock 设置成了 none。我的锅。

>All comments

才看到使用 dev 运行的是 cross-env REACT_APP_ENV=dev MOCK=none umi dev,其中 Mock 设置成了 none。我的锅。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yaoleiroyal picture yaoleiroyal  ·  3Comments

wuyongdec picture wuyongdec  ·  3Comments

zhuanglong picture zhuanglong  ·  3Comments

ghost picture ghost  ·  3Comments

Jerry-goodboy picture Jerry-goodboy  ·  3Comments