【问题标题】:Meteor build fails on Windows 10 - Process out of memoryWindows 10 上的 Meteor 构建失败 - 进程内存不足
【发布时间】:2019-01-31 23:59:40
【问题描述】:

到目前为止,我只使用我的 imac 和我的 macbook 来处理我的应用程序并且几乎没有问题。我现在也希望能够使用我的 Windows 电脑,但是经过 2 天的混乱,我无法让我的应用程序运行。我可以创建一个新应用,它运行良好。

我已经按照说明使用Chocolatey 安装了 Meteor,没有任何问题。

然后我从 git repo 中提取我的应用程序,运行 npm install,然后运行 ​​meteor run。一切顺利,直到出现此错误的“链接”阶段...

    C:\Users\Me\Desktop\myapp>meteor --settings settings-development.json                                             
    [[[[[ C:\Users\Me\Desktop\myapp]]]]]

    => Started proxy.
    => A patch (Meteor 1.5.4.2) for your current release is available!
       Update this project now with 'meteor update --patch'.
       Linking                                   -
    <--- Last few GCs --->

       58416 ms: Mark-sweep 678.5 (734.8) -> 678.5 (734.8) MB, 309.8 / 0 ms [allocation failure] [scavenge might not succeed].
       58824 ms: Mark-sweep 678.5 (734.8) -> 689.2 (734.8) MB, 407.8 / 0 ms [allocation failure] [scavenge might not succeed].
       59177 ms: Mark-sweep 689.2 (734.8) -> 689.0 (734.8) MB, 353.2 / 0 ms [last resort gc].
       59528 ms: Mark-sweep 689.0 (734.8) -> 689.2 (734.8) MB, 351.0 / 0 ms [last resort gc].


    <--- JS stacktrace --->

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

    Security context: 37E25599 <JS Object>
        1: JSONSerialize(aka JSONSerialize) [native json.js:~120] [pc=0DA21153] (this=37E08099 <undefined>,G=37E6D451 <String[4]: data>,j=09243DF1 <an Object with map 2D019699>,v=09243E49 <JS Function replacer (SharedFunctionInfo 2350ECD1)>,w=09243EC9 <JS Array[2]>,x=37E08365 <String[0]: >,y=37E08365 <String[0]: >)
        2: SerializeObject(aka SerializeObject) [native json.js:97] [pc=0DA23534] (this=37E080...

    FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

    C:\Users\Me\Desktop\myapp>

显然与内存不足有关。我从许多文章/线程等中收集到的是我需要设置TOOL_NODE_FLAGS="--max-old-space-size=4096"

但由于某种原因,在我运行set TOOL_NODE_FLAGS="--max-old-space-size=4096" 之后,我不再能够运行“流星运行”。命令提示符想了一会儿,然后什么都没有发生……

所以如果我运行C:\Users\Me\Desktop\myapp&gt;meteor --settings settings-development.json,我会收到上面的错误。

如果我运行C:\Users\Serks\Desktop\cakenote&gt;set TOOL_NODE_FLAGS="--max-old-space-size=4096",然后运行C:\Users\Me\Desktop\myapp&gt;meteor --settings settings-development.json,则没有任何反应,光标返回到...C:\Users\Serks\Desktop\cakenote

有谁知道如何通过 cmd 行让流星在 Windows 10 上以更多内存启动?

提前致谢。

【问题讨论】:

    标签: node.js windows memory meteor


    【解决方案1】:

    我认为这个选项在流星 1.5 中不起作用

    请看这个帖子 https://forums.meteor.com/t/meteor-wont-start-with-max-old-space-size-solved/44745

    【讨论】:

    • 正确。升级 Meteor 后,我可以使用set TOOL_NODE_FLAGS="--max-old-space-size=4096"
    猜你喜欢
    • 2014-12-27
    • 2018-11-14
    • 2023-03-30
    • 2010-11-01
    • 2018-02-05
    • 2017-08-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多