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 1.3.3 运行 umi-antd-pro 出错 #495

Closed
xiaohuoni opened this issue May 17, 2018 · 5 comments
Closed

umi 1.3.3 运行 umi-antd-pro 出错 #495

xiaohuoni opened this issue May 17, 2018 · 5 comments

Comments

@xiaohuoni
Copy link
Member

更新umi相关插件

"umi": "1.3.3",
"umi-plugin-dll": "^0.2.1",
 "umi-plugin-dva": "^0.7.2",
 "umi-plugin-routes": "0.1.4"

执行 npm start (umi dev)
报错

Compiling...

  build [==                  ] 10%
F:\umi-antd-pro\node_modules\webpack\lib\Stats.js:223                                        text += `\n @ ${current.readableIdentifier(requestShortener)}`;
                             ^
RangeError: Invalid string length
    at formatError (F:\umi-antd-pro\node_modules\webpack\lib\Stats.js:223:30)
    at Array.map (<anonymous>)
    at Stats.toJson (F:\umi-antd-pro\node_modules\webpack\lib\Stats.js:231:56)
    at Server.sockServer.on (F:\umi-antd-pro\node_modules\webpack-dev-server\lib\Server.js:607:43)
    at emitOne (events.js:116:13)
    at Server.emit (events.js:211:7)
    at App.emit (F:\umi-antd-pro\node_modules\sockjs\lib\sockjs.js:196:29)
    at F:\umi-antd-pro\node_modules\sockjs\lib\transport.js:111:25
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

非必现,一次不报错可以,ctrl +c 关闭之后再执行 npm start
我的电脑,最多三次,就一定会报这个错。
可重新demo :https://github.com/xiaohuoni/umi-antd-pro (需要更新umi相关插件版本)

@sorrycc
Copy link
Member

sorrycc commented May 18, 2018

mac 下不报错,估计是新增的 hard-source-webpack-plugin 在 windows 下的兼容问题,禁用他运行试试还会不会报错,

$ HARD_SOURCE=none umi dev

@xiaohuoni
Copy link
Member Author

在pro项目,禁用之后可以启动

@sorrycc
Copy link
Member

sorrycc commented May 18, 2018

相关 issue,mzgoddard/hard-source-webpack-plugin#274

@472756921
Copy link

弱弱地问一句怎么禁用 hard-source-webpack-plugin

@xiaohuoni
Copy link
Member Author

现在默认是禁用的吧

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

3 participants