fatal - AssertionError [ERR_ASSERTION]: Invalid plugin umi-plugin-react,[object Object], it must be string.
at E:\Nodejs\node_global\node_modules\umi\node_modules\@umijs\core\dist\service\plugin.js:143:35
expected: true,
operator: '=='
}
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
fatal - A complete log of this run can be found in:
fatal - E:\IDEA\Projects\GradutionDesign\itcast-haoke-manage-web\node_modules\.cache\logger\umi.log
fatal - Consider reporting a GitHub issue on https://github.com/umijs/umi/issues
这个错误信息显示umj-plugin-react插件配置出了问题,需要检查一下项目中的.umirc.js文件中是否正确配置了该插件。可以尝试将该插件的配置改为字符串形式,如下所示:
export default {
plugins: ['umi-plugin-react'],
// 其他配置项
}
如果还是出现相同的错误信息,可以尝试升级umijs和umi-plugin-react的版本,或者重新安装这两个依赖。同时,建议查看一下umijs官方文档中关于umi-plugin-react的配置方法,确认自己的配置是否正确。
怎么解决的