Ant-design-pro: 🐛[BUG]

Created on 1 Dec 2020  ·  10Comments  ·  Source: ant-design/ant-design-pro

🐛 bug 描述

安装完ant design pro之后,tyarn start报错
This relative module was not found:

  • ../plugin-layout/layoutExports in ./src/.umi-production/core/umiExports.ts
    Child

    ERROR in ./src/.umi-production/core/umiExports.ts
    Module not found: Error: Can't resolve '../plugin-layout/layoutExports' in 'E:weblearnsrc.umi-productioncore'
    @ ./src/.umi-production/core/umiExports.ts 8:0-47 8:0-47
    @ ./node_modules/umi/dist/index.esm.js
    @ ./src/global.tsx
    @ ./src/.umi-production/umi.ts
    @ multi ./src/.umi-production/umi.ts
    null
    build failed
    Error: build failed
    at E:[email protected]:138:27
    at finalCallback (E:weblearnnode_moduleswebpacklibMultiCompiler.js:254:12)
    at E:weblearnnode_moduleswebpacklibMultiCompiler.js:277:6
    at done (E:weblearnnode_modulesneo-asyncasync.js:2931:13)
    at runCompilers (E:weblearnnode_moduleswebpacklibMultiCompiler.js:181:48)
    at E:weblearnnode_moduleswebpacklibMultiCompiler.js:188:7
    at E:weblearnnode_moduleswebpacklibMultiCompiler.js:270:7
    at finalCallback (E:weblearnnode_moduleswebpacklibCompiler.js:257:39)
    at E:weblearnnode_moduleswebpacklibCompiler.js:273:13
    at _next3 (eval at create (E:weblearnnode_modulestapablelibHookCodeFactory.js:33:10), :16:1)
    at eval (eval at create (E:weblearnnode_modulestapablelibHookCodeFactory.js:33:10), :53:1)
    at runMicrotasks ()
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

🏞 期望结果

正常运行

💻 复现代码

tyarn create umi
选择ant design pro v5
tyarn
tyarn start

© 版本信息

  • Ant Design Pro 版本: V5
  • umi 版本 3.2.14
  • 浏览器环境
  • 开发环境 windows 10

🚑 其他信息

Most helpful comment

Same here. I updated @umijs/preset-react to 1.7.1 and the error started happening. I removed the package and re-added version 1.7.0 and it worked.

All 10 comments

Same here. I updated @umijs/preset-react to 1.7.1 and the error started happening. I removed the package and re-added version 1.7.0 and it worked.

应该是今天才刚发的包引起的,早上我创建的工程并不会启动报错,下午创建的就开始启动不了了,现在只能每次启动报错后先注释src/.umi/core/umiExports.ts里export * from '../plugin-layout/layoutExports'能够正常启动,而且我早上创建的工程在umiExports.ts里没有plugin-layout的export

昨晚能正常跑的项目,今天早上来就报错了

image

同问题,自己的cli工具报错,昨天好的

看起来是我写的plugin有问题 我修一下 大家都是pro v4吗

@ideaviewes 他寫V5
我也是V5

看起来是我写的plugin有问题 我修一下 大家都是pro v4吗

我的是v5版本

我是v5版本,一样的问题

pro v5 出同款报错

Was this page helpful?
0 / 5 - 0 ratings