umi错误it must be array of string 处理方法

现象

原教程https://www.yuque.com/ant-design/course/agmsgo

出现错误Plugin resolved failed, Please check your plugins config, it must be array of string.错误

解决方法

移除 umi-plugin-react
npm uninstall umi-plugin-react

添加 @umijs/preset-react
npm install @umijs/preset-react –save-dev

config/config.js

1
2
3
4
5
6
7
8
export default {
singular: true,
antd:{},
routes:[{
path: "/",
component: './helloworld',
}],
};