React Native packager.js bug崩溃开发服务器?

时间:2015-09-17 02:01:56

标签: javascript android windows reactjs react-native

似乎为应用程序提供JavaScript的开发服务器已破坏代码(在Windows上)。

调用它来运行开发服务器:node node_modules/react-native/packager/packager.js正常工作,直到App请求JavaScript Bundle。这会导致开发服务器崩溃:

每次崩溃看起来都略有不同,这里有一些例子:

    <--- Last few GCs --->

      299789 ms: Scavenge 1401.1 (1455.6) -> 1401.1 (1455.6) MB, 7.4 / 0 ms (+ 2.0 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
      300662 ms: Mark-sweep 1401.1 (1455.6) -> 1401.0 (1455.6) MB, 872.8 / 1 ms (+ 3.0 ms in 2 steps since start of marking, biggest step 2.0 ms) [last resort gc].
      301517 ms: Mark-sweep 1401.0 (1455.6) -> 1401.0 (1455.6) MB, 855.0 / 0 ms [last resort gc].


    <--- JS stacktrace --->

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

    Security context: 00000394AB737349 <JS Object>
        1: join [path.js:~217] [pc=000000C79FE49004] (this=000003690CB64909 <an Object with map 000003B796023E19>)
        2: arguments adaptor frame: 3->0
        3: /* anonymous */(aka /* anonymous */) [Y:\Mobile\node_modules\react-native\packager\react-packager\src\DependencyResolver\DependencyGraph\ResolutionRequest.js:~226] [pc=000000C7A12131DA] (this=00000394AB704131 <undefined>,realModuleN...

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

另一个:

    <--- JS stacktrace --->

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

    Security context: 000000A2FB137349 <JS Object>
        1: split(aka split) [Y:\Mobile\node_modules\react-native\node_modules\babel-core\node_modules\core-js\modules\es6.regexp.split.js:7] [pc=000003ABD89C3ED4] (this=0000033DA680BFD9 <String[33]: \node_modules\regenerator/runtime>,separator=0000033DA680BF91
    <JS RegExp>,limit=000000A2FB104131 <undefined>)
        2: arguments adaptor frame: 1->2
        3: normalize [path.js:193] [pc=000003ABD8...

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

这使得无法在Windows上使用React Native。

请帮忙解决这个问题,谢谢。

1 个答案:

答案 0 :(得分:1)

看起来有一个修复,对Github问题发表了评论:

https://github.com/facebook/react-native/issues/2787