简体   繁体   English

在带有节点 7 的 macOS 上运行“ionic build ios”时,我遇到了以下消息:超出标准输出 maxBuffer。 我该如何解决?

[英]When running 'ionic build ios' on macOS with node 7 I get stuck on this message: stdout maxBuffer exceeded. How could I solve it?

Suddenly I started having this problem when trying to build my iOS app with ionic build ios .突然,当我尝试使用ionic build ios构建我的 iOS 应用程序时,我开始遇到这个问题。 I don't understand what could be causing it, because it was running just fine, then in the next day I get this message:我不明白是什么原因造成的,因为它运行得很好,然后在第二天我收到了这条消息:

...
...
Running command: HC-Ionic/hooks/after_prepare/010_add_platform_class.js HC-Ionic

Running command: HC-Ionic/hooks/after_prepare/020_remove_sass_from_platforms.js HC-Ionic


stdout maxBuffer exceeded

  

The only thing I remember doing before this problem started happening was changing my node version sometimes using the application 'n'.在这个问题开始发生之前,我唯一记得做的就是有时使用应用程序“n”更改我的节点版本。 But I already uninstalled the versions, set up the right one, but still was not able to figure out, trying to search on the internet.但是我已经卸载了版本,设置了正确的版本,但仍然无法弄清楚,试图在互联网上搜索。

This is my system info:这是我的系统信息:

Cordova CLI: 8.1.2 (cordova-lib@8.1.1)
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS
Node Version: v7.10.1
Xcode version: Xcode 12.4 Build version 12D4e

This configuration is necessary because my app only runs with this node version.此配置是必要的,因为我的应用程序仅使用此节点版本运行。

Does anyone have any ideas?有没有人有任何想法?

I found a solution.我找到了解决方案。 Apparently I had too many simulators on xcode and this exceeded the json in the build.显然我在 xcode 上有太多的模拟器,这超过了构建中的 json。 If the list exceeds 200kb, node 7 doesn't compile.如果列表超过 200kb,则节点 7 不会编译。 Just removed some unnecessary simulators and it worked.刚刚删除了一些不必要的模拟器,它就起作用了。

Node versions prior to v 12.x use a default maxBuffer value of 1 kilobyte ( source ), which is realtively small. v 12.x之前的节点版本使用 1 KB ( source ) 的默认maxBuffer值,该值非常小。

Later releases increased the default maxBuffer to 1 megabyte ( source ) - you should really consider upgrading as the release of Node you're running is ancient (EOL'd in 2017), at least by software standards.后来的版本将默认的maxBuffer增加到 1 兆字节( source ) - 你应该真正考虑升级,因为你运行的 Node 版本很古老(2017 年 EOL'd ),至少按照软件标准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM