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

更新到umi@2.5.0后编译错误 #1983

Closed
leiysky opened this issue Feb 15, 2019 · 12 comments
Closed

更新到umi@2.5.0后编译错误 #1983

leiysky opened this issue Feb 15, 2019 · 12 comments

Comments

@leiysky
Copy link

leiysky commented Feb 15, 2019

image

看起来像是dynamic module的loader问题。

umi@2.4.4编译的结果:

import dynamic from 'umi/dynamic';
{
    "path": "/",
    "component": dynamic({ loader: () => import('../../layouts/BasicLayout'), loading: require('/Users/leiysky/work/ttarch/archcloud/src/components/PageLoading/index').default }),
    "Routes": [require('../Authorized').default],
    "routes":[],
}

umi@2.5.0编译的结果:

import _dvaDynamic from 'dva/dynamic';
{
    "path": "/",
    "component": _dvaDynamic({
      component: () => import('../../layouts/BasicLayout'),
      LoadingComponent: require('/data00/home/leiyu.leiysky/ttarch-cloud-fe/src/components/PageLoading/index').default,
}),
    "Routes": [require('../Authorized').default],
    "routes": [],
}
@mlqgg
Copy link

mlqgg commented Feb 15, 2019

遇到了同样的错误。。。

@leiysky
Copy link
Author

leiysky commented Feb 15, 2019

@mlqgg 锁的大版本,下午上线的时候崩了,回滚也崩了。。。😆

@sorrycc
Copy link
Member

sorrycc commented Feb 15, 2019

给个可重现的仓库?我试了下 ant-design-pro 没有发现问题。

@leiysky 回滚为啥会崩?

@sorrycc
Copy link
Member

sorrycc commented Feb 15, 2019

会不会是 umi 升了但插件还是老的?

@jwmann
Copy link

jwmann commented Feb 15, 2019

I have the same problem in ant-design-pro
Here's my ticket ant-design/ant-design-pro#3548

@mlqgg
Copy link

mlqgg commented Feb 16, 2019

在webpack的git下发现了类似的issue,然而问题的根本好像是npm的bug???
webpack/webpack#8779

@sorrycc
Copy link
Member

sorrycc commented Feb 16, 2019

你们是用 npm 安装依赖?试试 yarn 和 cnpm 会不会有问题?

@zhilianbi520
Copy link

遇到同样问题~!求解~

@sorrycc
Copy link
Member

sorrycc commented Feb 18, 2019

@zhilianbi520 先用 cnpm 或 yarn。

@zhilianbi520
Copy link

zhilianbi520 commented Feb 18, 2019

@sorrycc cnpm 也有同样的问题。 npm run build
jietu20190218-143833
这个报错。。粘错图了。
umi的版本是2.4.2的

@sorrycc
Copy link
Member

sorrycc commented Feb 18, 2019

@zhilianbi520 这个错和前面的不一样吧。

@zhilianbi520
Copy link

更新"umi-plugin-react": "^1.5.0" 这个?回退webpack版本是更新这个依赖库嘛?

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

No branches or pull requests

5 participants