简体   繁体   English

在Mac OSX 10.5上运行Node.js或NPM时“处理内存不足”

[英]“Process out of memory” when running Node.js or NPM on Mac OSX 10.5

I am completely new to both Macs and Node.js, so sorry if this one is a bit basic. 我对Mac和Node.js都是全新的,对不起,如果这个有点基础。

I am running Mac OS X 10.5 (Leopard) and have just installed the last version of Node.js (released version, not built from source). 我正在运行Mac OS X 10.5(Leopard)并刚刚安装了最新版本的Node.js(发布版本,不是从源代码构建的)。

Whenever I attempt to run Node or do an NPM install, I get the following error message: 每当我尝试运行Node或进行NPM安装时,都会收到以下错误消息:

FATAL ERROR: CodeRange::GetNextAllocationBlock Allocation failed - process out of memory

Does anyone know what the problem is? 有谁知道问题是什么? If not, what would be the next steps to figure this out? 如果没有,那么接下来的步骤是什么呢?

Edit: It turns out that if I run these commands a few times then they eventually work. 编辑:事实证明,如果我运行这些命令几次,那么它们最终会起作用。 So my work-around is to keep repeating the command until I get success. 所以我的解决方法是不断重复命令,直到我获得成功。 This is better than nothing but still not acceptable. 这比没有好,但仍然不能接受。 Software like WebStorm, which needs to execute these tools, doesn't know about this workaround and fails all the time. 像WebStorm这样需要执行这些工具的软件并不知道这种解决方法并且一直都会失败。

The issue seems to show up when running the distributed build of Node on anything pre OSX 10.6. 在OSX 10.6之前的任何版本上运行Node的分布式构建时,似乎会出现这个问题。

You can manually build the binary yourself if you don't have the option to upgrade your OS. 如果您没有升级操作系统的选项,可以自己手动构建二进制文件。

http://therobotsbrain.blogspot.com.au/2012/03/installing-nodejs-on-os-x-105.html http://therobotsbrain.blogspot.com.au/2012/03/installing-nodejs-on-os-x-105.html

I'm running X.5.8, and node 0.10.13 was giving me this error message. 我正在运行X.5.8,节点0.10.13给了我这个错误消息。 I tried some earlier versions of node, and 0.10.3 works while 0.10.4 gets the error message. 我尝试了一些早期版本的节点,0.10.3工作,而0.10.4获取错误消息。 This is the x86 version, x64 seems to crash at .3 but works at .0. 这是x86版本,x64似乎在.3崩溃,但工作在.0。 Oh wait, it's more complicated than that. 哦等等,这比那更复杂。 Seems to make a difference when I make a symlink to the app in /usr/local/bin, it crashes. 当我在/ usr / local / bin中为应用程序创建符号链接时,它似乎有所作为,它崩溃了。 more often. 更经常的。 Try a few different ones see which work for you. 尝试一些不同的,看看哪些适合你。

I really need to get a new laptop. 我真的需要一台新的笔记本电脑。

download here: http://nodejs.org/dist/ 在这里下载: http//nodejs.org/dist/

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

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