javascript - NPM Getting Aborted Error in nodejs - Stack Overflow

I am new in nodejs i have installed nodejs successfully, when i init the npmi am getting aborted erro

I am new in nodejs i have installed nodejs successfully, when i init the npm i am getting aborted error.

I have a lot of memory means 32GB RAM and 1TB HD.

Only npm -v mand working rest all mand not working with npm.

Please see the below error and help me.

[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

I am new in nodejs i have installed nodejs successfully, when i init the npm i am getting aborted error.

I have a lot of memory means 32GB RAM and 1TB HD.

Only npm -v mand working rest all mand not working with npm.

Please see the below error and help me.

[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
Share Improve this question asked Jul 18, 2018 at 6:03 eharaj husaineharaj husain 2034 silver badges12 bronze badges 2
  • Possible duplicate of FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory – Laxmikant Dange Commented Jul 18, 2018 at 6:08
  • I have tried that solution that is not working with me. – eharaj husain Commented Jul 18, 2018 at 8:22
Add a ment  | 

1 Answer 1

Reset to default 6

One way to overe the FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory error is to increase the memory allocation, for which we need to set the the max_old_space_size variable value accordingly,

For e.g,

node --max-old-space-size=1024 index.js => This will allocate 1GB memory.

Hence try increasing it like,

node --max_old_space_size=2048 and once done execute your npm init mand.

Hope this helps!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744318838a4568312.html

相关推荐

  • javascript - NPM Getting Aborted Error in nodejs - Stack Overflow

    I am new in nodejs i have installed nodejs successfully, when i init the npmi am getting aborted erro

    7天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信