quantorio icon indicating copy to clipboard operation
quantorio copied to clipboard

怎么在本地运行?

Open alextangchao opened this issue 7 years ago • 2 comments

我把游戏里data/base里的文件复制到quantorio/data/base底下,然后在quantorio目录下运行

npm install
npm run dev

然后出来这个报错信息

D:\github\quantorio>npm run dev

> [email protected] dev D:\github\quantorio
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 92% chunk asset optimization
<--- Last few GCs --->

[7332:0000021F6A1FDFB0]    37207 ms: Mark-sweep 1398.3 (1441.0) -> 1398.3 (1444.5) MB, 89.5 / 0.0 ms  (average mu = 0.178, current mu = 0.092) allocation failure scavenge might not succeed
[7332:0000021F6A1FDFB0]    37304 ms: Mark-sweep 1401.9 (1444.5) -> 1402.0 (1444.5) MB, 91.0 / 0.0 ms  (average mu = 0.122, current mu = 0.060) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x021d7b79e6e1 <JSObject>
    0: builtin exit frame: stringify(this=0x021d7b791a19 <Object map = 0000000671F042A9>,0x0155d01826f1 <undefined>,0x0155d01826f1 <undefined>,0x02e5df602229 <Object map = 00000370524AF801>,0x021d7b791a19 <Object map = 0000000671F042A9>)

    1: arguments adaptor frame: 1->3
    2: /* anonymous */(aka /* anonymous */) [0000008C6D8FFB71] [D:\github\quantorio\node_modules\webpack\lib\SourceMapDevT...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF79079ECE5
 2: 00007FF790778196
 3: 00007FF790778BA0
 4: 00007FF790A08D5E
 5: 00007FF790A08C8F
 6: 00007FF790F469D4
 7: 00007FF790F3D137
 8: 00007FF790F3B6AC
 9: 00007FF790F44627
10: 00007FF790F446A6
11: 00007FF790AE73EB
12: 00007FF790AE9EED
13: 00007FF790BCA87B
14: 00007FF790F0E7EF
15: 00007FF790F0A92E
16: 00007FF790F09A8C
17: 00007FF790F0D9AB
18: 00007FF790F0AC3D
19: 00007FF790F07C5C
20: 00007FF790BD76D6
21: 00007FF790BD75CB
22: 000000F68365C721
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] dev 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\Alex\AppData\Roaming\npm-cache\_logs\2019-02-28T05_16_00_181Z-debug.log

应该怎样做才能在本地运行根据自己游戏数据的计算?

alextangchao avatar Feb 28 '19 05:02 alextangchao

看起来是本地的js引擎内存超限,这个需要你本地调优

发送自 Windows 10 版邮件应用

发件人: alextangchao 发送时间: 2019年2月28日 13:23 收件人: garveen/quantorio 抄送: Subscribed 主题: [garveen/quantorio] 怎么在本地运行? (#6)

我把游戏里data/base里的文件复制到quantorio/data/base底下,然后在quantorio目录下运行 npm install

npm run dev

然后出来这个报错信息 D:\github\quantorio>npm run dev

[email protected] dev D:\github\quantorio

webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

92% chunk asset optimization

<--- Last few GCs --->

[7332:0000021F6A1FDFB0] 37207 ms: Mark-sweep 1398.3 (1441.0) -> 1398.3 (1444.5) MB, 89.5 / 0.0 ms (average mu = 0.178, current mu = 0.092) allocation failure scavenge might not succeed

[7332:0000021F6A1FDFB0] 37304 ms: Mark-sweep 1401.9 (1444.5) -> 1402.0 (1444.5) MB, 91.0 / 0.0 ms (average mu = 0.122, current mu = 0.060) allocation failure scavenge might not succeed

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x021d7b79e6e1 <JSObject>

0: builtin exit frame: stringify(this=0x021d7b791a19 <Object map = 0000000671F042A9>,0x0155d01826f1 <undefined>,0x0155d01826f1 <undefined>,0x02e5df602229 <Object map = 00000370524AF801>,0x021d7b791a19 <Object map = 0000000671F042A9>)



1: arguments adaptor frame: 1->3

2: /* anonymous */(aka /* anonymous */) [0000008C6D8FFB71] [D:\github\quantorio\node_modules\webpack\lib\SourceMapDevT...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

1: 00007FF79079ECE5

2: 00007FF790778196

3: 00007FF790778BA0

4: 00007FF790A08D5E

5: 00007FF790A08C8F

6: 00007FF790F469D4

7: 00007FF790F3D137

8: 00007FF790F3B6AC

9: 00007FF790F44627

10: 00007FF790F446A6

11: 00007FF790AE73EB

12: 00007FF790AE9EED

13: 00007FF790BCA87B

14: 00007FF790F0E7EF

15: 00007FF790F0A92E

16: 00007FF790F09A8C

17: 00007FF790F0D9AB

18: 00007FF790F0AC3D

19: 00007FF790F07C5C

20: 00007FF790BD76D6

21: 00007FF790BD75CB

22: 000000F68365C721

npm ERR! code ELIFECYCLE

npm ERR! errno 134

npm ERR! [email protected] dev: webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

npm ERR! Exit status 134

npm ERR!

npm ERR! Failed at the [email protected] dev 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\Alex\AppData\Roaming\npm-cache_logs\2019-02-28T05_16_00_181Z-debug.log 应该怎样做才能在本地运行根据自己游戏数据的计算? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

garveen avatar Feb 28 '19 11:02 garveen

编译时内存溢出问题已解决。

在编译时会报错

This relative module was not found:

* ../../public/base.zip in ./src/components/LuaLoader.js

将游戏里data/base里的文件压缩到quantorio/public/base.zip然后编译通过了

但是http://localhost:8080/里面一直显示的是开头的那个加载状态,而且会自动下载base.zip这个文件

alextangchao avatar Mar 01 '19 03:03 alextangchao