【发布时间】:2018-07-18 14:11:50
【问题描述】:
我是 nodejs 的新手,我已经成功安装了 nodejs,当我初始化 npm 时出现中止错误。
我有很多内存意味着 32GB RAM 和 1TB HD。
只有 npm -v 命令有效,其余所有命令都不能与 npm 一起工作。
请查看以下错误并帮助我。
[xyz@server node]$ npm init
<--- Last few GCs --->
[13396:0x4389aa0] 126 ms: Scavenge 6.3 (10.8) -> 5.2 (11.8) MB, 1.2 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
[13396:0x4389aa0] 168 ms: Scavenge 7.7 (12.3) -> 6.7 (12.8) MB, 2.3 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
[13396:0x4389aa0] 215 ms: Scavenge 8.5 (12.8) -> 7.6 (16.8) MB, 12.3 / 0.0 ms (average mu = 1.000, current mu = 1.000) allocation failure
<--- JS stacktrace --->
Cannot get stack trace in GC.
FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory
1: 0x89a0c0 node::Abort() [npm]
2: 0x89a10c [npm]
3: 0xa879be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [npm]
4: 0xa87bd8 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [npm]
5: 0xe753e2 [npm]
6: 0xea6376 v8::internal::MarkCompactCollector::Evacuate() [npm]
7: 0xea69d2 v8::internal::MarkCompactCollector::CollectGarbage() [npm]
8: 0xe808b1 v8::internal::Heap::MarkCompact() [npm]
9: 0xe80fb1 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [npm]
10: 0xe81c74 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [npm]
11: 0xe845a5 v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [npm]
12: 0xe4d3b8 v8::internal::Factory::NewFeedbackVector(v8::internal::Handle<v8::internal::SharedFunctionInfo>, v8::internal::PretenureFlag) [npm]
13: 0xe29453 v8::internal::FeedbackVector::New(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SharedFunctionInfo>)[npm]
14: 0xf77319 v8::internal::JSFunction::EnsureFeedbackVector(v8::internal::Handle<v8::internal::JSFunction>) [npm]
15: 0xd9e60a v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag) [npm]
16: 0x10b9822 v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [npm]
17: 0x3f6b33a041bd
Aborted
【问题讨论】:
-
我已经尝试过不适合我的解决方案。
标签: javascript node.js npm