Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装后,按要求配置,报错Plugin apply failed: Cannot read property 'routes' of undefined #12

Open
ghost opened this issue Apr 15, 2020 · 7 comments

Comments

@ghost
Copy link

ghost commented Apr 15, 2020

image
麻烦问一下,这是什么原因

@zok2
Copy link

zok2 commented Apr 19, 2020

我也遇到;

@metafysik
Copy link

I have same issues.

@zlyyyy
Copy link

zlyyyy commented May 6, 2020

同问题。。

@linfengluo
Copy link

Plugin apply failed: Cannot read property 'routes' of undefined
× error TypeError: Cannot read property 'routes' of undefined
at Array. (E:\zhicheng-mall-admin\node_modules\umi-plugin-antd-icon-config\lib/index.js:56:38)
at register.opts (E:\zhicheng-mall-admin\node_modules\umi-build-dev\lib\PluginAPI.js:219:25)
at reduce (E:\zhicheng-mall-admin\node_modules\umi-build-dev\lib\Service.js:308:16)
at Array.reduce ()
at Service.applyPlugins (E:\zhicheng-mall-admin\node_modules\umi-build-dev\lib\Service.js:304:42)
at FilesGenerator.generateFiles (E:\zhicheng-mall-admin\node_modules\umi-build-dev\lib\FilesGenerator.js:235:18)
at FilesGenerator.generate (E:\zhicheng-mall-admin\node_modules\umi-build-dev\lib\FilesGenerator.js:157:10)
at service._applyPluginsAsync.then (E:\zhicheng-mall-admin\node_modules\umi-build-dev\lib\plugins\commands\dev\index.js:108:26)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: cross-env MOCK=none umi dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Feng\AppData\Roaming\npm-cache_logs\2020-06-12T06_57_44_561Z-debug.log

@haichaoshi
Copy link

"peerDependencies": {
"umi": "3.x"
},

may need to upgrade umi to 3.x

@anchor-sherry
Copy link

遇到这个问题 +1

@youxinyun
Copy link

遇到这个问题 +10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants