npm module installation constantly aborting

2019-08-03 21:40发布

I am faced with npm module installation issue. Each time I tried installing a new modules, the installation process crashes and consequently abort. My npm version is 1.4.28 and node version is 0.10.35 running on debian wheezy. I tried installing a couple (yo, bower, grunt, closurecompiler) and the same problem persit. See sample installation attempt below

npm install closurecompiler -g

The above spill the following to the terminal

==== Stack trace ============================================

Security context: 0x25834659 <JS Object>#0#
    1: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#)
    2: emit [events.js:~53] (this=0x38fada59 <an ExtendedHeader>#1#,type=0x51614861 <String[4]: data>)
    3: arguments adaptor frame: 2->1
    4: _read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111] (this=0x38fada59 <an ExtendedHeader>#1#)
    8: _read [native v8natives.js:1594] (this=0x38fada59 <an ExtendedHeader>#1#)
    9: write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:~50] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#)
   10: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:105] (this=0x38f3afc9 <an Extract>#3#,c=0x38fb05c5 <a Buffer>#2#)
   11: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:~46] (this=0x38f430c1 <a BlockStream>#4#,c=0x38fb05c5 <a Buffer>#2#)
   12: emit [events.js:~53] (this=0x38f430c1 <a BlockStream>#4#,type=0x51614861 <String[4]: data>)
   13: arguments adaptor frame: 2->1
   14: _emitChunk [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145] (this=0x38f430c1 <a BlockStream>#4#,flush=0x25808091 <undefined>)
   15: arguments adaptor frame: 0->1
   16: resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55] (this=0x38f430c1 <a BlockStream>#4#)   17: arguments adaptor frame: 1->0
   18: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js:~251] (this=0x38f3afc9 <an Extract>#3#,who=0x25808091 <undefined>)
   19: arguments adaptor frame: 0->1
   20: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extract.js:57] (this=0x38f43109 <a DirWriter>#5#)
   21: emit [events.js:~53] (this=0x38f43109 <a DirWriter>#5#,type=0x3334f785 <String[5]: ready>)
   22: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:39] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>)
   23: arguments adaptor frame: 2->1
   24: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:29] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>)
   26: oncomplete [fs.js:108] (this=0x38f94099 <an Object>#7#)
   27: arguments adaptor frame: 1->0

==== Details ================================================

[1]: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#) {
  // stack-allocated locals
  var i = 411
  var l = 512
  var b = 68
  var val = 0x38fb17ad <String[5]: 2.4.x>
  // expression stack (top to bottom)
  [05] : 0
  [04] : 2113118
--------- s o u r c e   c o d e ---------
function parse(c) {?  if (this._state === ERR) return??  for ( var i = 0, l = c.length?      ; i < l?      ; this._position++, this._fieldPos++, i++) {?    // console.error("top of loop, size="+this._size)??    var b = c[i]??    if (this._size >= 0 && this._fieldPos > this._size) {?      error(this, "field exceed...

-----------------------------------------
}

[2]: emit [events.js:~53] (this=0x38fada59 <an ExtendedHeader>#1#,type=0x51614861 <String[4]: data>) {
// optimized frame
}
[3]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x51614861 <String[4]: data>
  [01] : 0x38fb05c5 <a Buffer>#2#  // not passed to callee
}

[4]: _read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111] (this=0x38fada59 <an ExtendedHeader>#1#) {
  // stack-allocated locals
  var chunk = 0x38fb05c5 <a Buffer>#2#
  var mql = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [04] : 0x38fb05c5 <a Buffer>#2#
  [03] : 0x51614861 <String[4]: data>
  [02] : 0x38fada59 <an ExtendedHeader>#1#
--------- s o u r c e   c o d e ---------
function () {?  // console.error("    Tar Entry _read", this.path)??  if (this._paused || this._reading || this._ended) return??  // set this flag so that event handlers don't inadvertently?  // get multiple _read() calls running.?  this._reading = true??  // have any data to emit??  while (this._index < thi...

-----------------------------------------
}

[8]: _read [native v8natives.js:1594] (this=0x38fada59 <an ExtendedHeader>#1#) {
  // stack-allocated locals
  var arguments = 0x38fb0651 <an Arguments>#8#
  var c = 0x38fb0661 <JS Array[2]>#9#
  var d = 0
  var e = 0x25808091 <undefined>
  var f = 0x25808091 <undefined>
  var g = 0x25808091 <undefined>
  var h = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [11] : 0
  [10] : 2
  [09] : 0x38fb0661 <JS Array[2]>#9#
  [08] : 0x38fada59 <an ExtendedHeader>#1#
  [07] : 0x41cb91f5 <JS Function>#10#
--------- s o u r c e   c o d e ---------
function (){??"use strict";???if(%_IsConstructCall()){?return %NewObjectFromBound(b);?}?var c=%BoundFunctionGetBindings(b);??var d=%_ArgumentsLength();?if(d==0){?return %Apply(c[0],c[1],c,2,c.length-2);?}?if(c.length===2){?return %Apply(c[0],c[1],arguments,0,d);?}?var e=c.length-2;?var f=new InternalArray(e+...

-----------------------------------------
}

[9]: write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:~50] (this=0x38fada59 <an ExtendedHeader>#1#,c=0x38fb05c5 <a Buffer>#2#) {
// optimized frame
}
[10]: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:105] (this=0x38f3afc9 <an Extract>#3#,c=0x38fb05c5 <a Buffer>#2#) {
  // stack-allocated locals
  var entry = 0x38fada59 <an ExtendedHeader>#1#
  var zero = 0x25808091 <undefined>
  var i = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [04] : 0x38fb05c5 <a Buffer>#2#
  [03] : 0x38fada59 <an ExtendedHeader>#1#
--------- s o u r c e   c o d e ---------
function (c) {?  assert(c && c.length === 512, "block size should be 512")??  // one of three cases.?  // 1. A new header?  // 2. A part of a file/extended header?  // 3. One of two or more EOF null blocks??  if (this._entry) {?    var entry = this._entry?    entry.write(c)?    if (entry._remaining === 0) {?...

-----------------------------------------
}

[11]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:~46] (this=0x38f430c1 <a BlockStream>#4#,c=0x38fb05c5 <a Buffer>#2#) {
// optimized frame
}
[12]: emit [events.js:~53] (this=0x38f430c1 <a BlockStream>#4#,type=0x51614861 <String[4]: data>) {
// optimized frame
}
[13]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x51614861 <String[4]: data>
  [01] : 0x38fb05c5 <a Buffer>#2#  // not passed to callee
}

[14]: _emitChunk [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:145] (this=0x38f430c1 <a BlockStream>#4#,flush=0x25808091 <undefined>) {
  // stack-allocated locals
  var padBytes = 0x25808091 <undefined>
  var bufferIndex = 0
  var out = 0x38fb05c5 <a Buffer>#2#
  var outOffset = 0
  var outHas = 0
  var cur = 0x38f556bd <a Buffer>#11#
  var curHas = 15360
  var l = 0x25808091 <undefined>
  var i = 0x25808091 <undefined>
  // expression stack (top to bottom)
  [11] : 0x38fb05c5 <a Buffer>#2#
  [10] : 0x51614861 <String[4]: data>
  [09] : 0x38f430c1 <a BlockStream>#4#
--------- s o u r c e   c o d e ---------
function (flush) {?  // debug("emitChunk flush=%j emitting=%j paused=%j", flush, this._emitting, this._paused)??  // emit a <chunkSize> chunk?  if (flush && this._zeroes) {?    // debug("    BS push zeroes", this._bufferLength)?    // push a chunk of zeroes?    var padBytes = (this._bufferLength % this._chun...

-----------------------------------------
}

[15]: arguments adaptor frame: 0->1 {
}

[16]: resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55] (this=0x38f430c1 <a BlockStream>#4#) {
// optimized frame
}
[17]: arguments adaptor frame: 1->0 {
  // actual arguments
  [00] : 0x38f3afc9 <an Extract>#3#  // not passed to callee
}

[18]: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js:~251] (this=0x38f3afc9 <an Extract>#3#,who=0x25808091 <undefined>) {
// optimized frame
}
[19]: arguments adaptor frame: 0->1 {
}

[20]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extract.js:57] (this=0x38f43109 <a DirWriter>#5#) {
  // expression stack (top to bottom)
  [00] : 0x38f3afc9 <an Extract>#3#
--------- s o u r c e   c o d e ---------
function () {?    me.pipe(me._fst, { end: false })?    me.resume()?  }
-----------------------------------------
}

[21]: emit [events.js:~53] (this=0x38f43109 <a DirWriter>#5#,type=0x3334f785 <String[5]: ready>) {
// optimized frame
}
[22]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:39] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>) {
  // expression stack (top to bottom)
  [01] : 0x3334f785 <String[5]: ready>
  [00] : 0x38f43109 <a DirWriter>#5#
--------- s o u r c e   c o d e ---------
function (er) {?    if (er) return me.error(er)?    // ready to start getting entries!?    me.ready = true?    me.emit("ready")?    me._process()?  }
-----------------------------------------
}

[23]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x25808081 <null>
  [01] : 0x38f93f31 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>  // not passed to callee
}

[24]: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:29] (this=0x25834701 <JS Global Object>#6#,er=0x25808081 <null>) {
  // heap-allocated locals
  var er = 0x25808081 <null>
  // expression stack (top to bottom)
  [03] : 0x38f93f31 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
  [02] : 0x25808081 <null>
  [01] : 0x25834701 <JS Global Object>#6#
  [00] : 0x38f93a91 <JS Function>#12#
--------- s o u r c e   c o d e ---------
function (er) {?        if (!er) {?            made = made || p;?            return cb(null, made);?        }?        switch (er.code) {?            case 'ENOENT':?                mkdirP(path.dirname(p), opts, function (er, made) {?                    if (er) cb(er, made);?                    else mkdirP(p, ...

-----------------------------------------
}

[26]: oncomplete [fs.js:108] (this=0x38f94099 <an Object>#7#) {
  // stack-allocated locals
  var arguments = 0x38fabf71 <an Arguments>#13#
  // expression stack (top to bottom)
  [03] : 0x38fabf71 <an Arguments>#13#
  [02] : 0x25808081 <null>
  [01] : 0x38f93f45 <JS Function>#14#
--------- s o u r c e   c o d e ---------
function () {?    return cb.apply(null, arguments);?  }
-----------------------------------------
}

[27]: arguments adaptor frame: 1->0 {
  // actual arguments
  [00] : 0x25808081 <null>  // not passed to callee
}

==== Key         ============================================

#0# 0x25834659: 0x25834659 <JS Object>
#1# 0x38fada59: 0x38fada59 <an ExtendedHeader>
            domain: 0x25808081 <null>
           _events: 0x38fadb01 <an Object>#15#
     _maxListeners: 10
          readable: 0x258080b1 <true>
          writable: 0x258080b1 <true>
        _needDrain: 0x258080c1 <false>
           _paused: 0x258080c1 <false>
          _reading: 0x258080b1 <true>
           _ending: 0x258080c1 <false>
            _ended: 0x258080c1 <false>
        _remaining: 653
            _queue: 0x38fadb9d <JS Array[1]>#16#
            _index: 1
         _queueLen: 1
             _read: 0x38fadc09 <JS Function>#17#
             props: 0x38fadca9 <an Object>#18#
           _header: 0x38fac43d <a TarHeader>#19#
         _extended: 0x38fadcd5 <an Object>#20#
           _global: 0x38fadd05 <an Object>#21#
              type: 0x3334ee95 <String[14]: ExtendedHeader>
              path: 0x38fac5c9 <String[30]: PaxHeader/package/package.json>
              size: 1677
            fields: 0x38fae435 <an Object>#22#
         _position: 923
         _fieldPos: 6
            _state: 1
          _sizeBuf: 0x38fae4b5 <JS Array[0]>#23#
           _keyBuf: 0x38fae50d <JS Array[3]>#24#
           _valBuf: 0x38fae52d <JS Array[0]>#25#
             _size: 95
              _key: 0x38fb16f5 <String[41]: NODETAR.package.devDependencies.uglify-js>
              meta: 0x258080b1 <true>
#2# 0x38fb05c5: 0x38fb05c5 <a Buffer>
            length: 512
            parent: 0x38f60e09 <a SlowBuffer>#26#
            offset: 1024
#3# 0x38f3afc9: 0x38f3afc9 <an Extract>
            domain: 0x25808081 <null>
           _events: 0x38f430b5 <an Object>#27#
     _maxListeners: 10
          writable: 0x258080b1 <true>
          readable: 0x258080b1 <true>
           _stream: 0x38f430c1 <a BlockStream>#4#
          position: 1024
            _ended: 0x258080c1 <false>
              _fst: 0x38f43109 <a DirWriter>#5#
           _paused: 0x258080c1 <false>
       _eofStarted: 0x258080c1 <false>
            _entry: 0x38fada59 <an ExtendedHeader>#1#
#4# 0x38f430c1: 0x38f430c1 <a BlockStream>
          readable: 0x258080b1 <true>
          writable: 0x258080b1 <true>
              _opt: 0x38f4d331 <an Object>#28#
        _chunkSize: 512
           _offset: 1536
           _buffer: 0x38f4d33d <JS Array[1]>#29#
     _bufferLength: 14848
           _zeroes: 0x38f4d34d <a Buffer>#30#
           _events: 0x38f4d365 <an Object>#31#
           _paused: 0x258080c1 <false>
        _needDrain: 0x258080b1 <true>
         _emitting: 0x258080b1 <true>
#5# 0x38f43109: 0x38f43109 <a DirWriter>
            domain: 0x25808081 <null>
           _events: 0x38f4d3a9 <an Object>#32#
     _maxListeners: 10
              type: 0x3334e6ed <String[9]: Directory>
             props: 0x38f297e1 <an Object>#33#
             depth: 0
           clobber: 0x258080b1 <true>
            parent: 0x25808081 <null>
              root: 0x38f43109 <a DirWriter>#5#
              path: 0x38f4d3b5 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
             _path: 0x38f4d3b5 <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
          basename: 0x38f51b0d <String[10]: underscore>
           dirname: 0x38f51b2d <String[75]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules>
          linkpath: 0x25808081 <null>
              size: 0x25808091 <undefined>
          readable: 0x258080c1 <false>
          writable: 0x258080b1 <true>
           _buffer: 0x38f51b41 <JS Array[0]>#34#
             ready: 0x258080b1 <true>
            filter: 0x253df285 <JS Function>#35#
          _madeDir: 0x25808081 <null>
#6# 0x25834701: 0x25834701 <JS Global Object>
#7# 0x38f94099: 0x38f94099 <an Object>
            domain: 0x25808081 <null>
        oncomplete: 0x38f93f85 <JS Function>#36#
#8# 0x38fb0651: 0x38fb0651 <an Arguments>
            length: 0
#9# 0x38fb0661: 0x38fb0661 <JS Array[2]>
                 0: 0x41cb91f5 <JS Function>#10#
                 1: 0x38fada59 <an ExtendedHeader>#1#
#10# 0x41cb91f5: 0x41cb91f5 <JS Function>
#11# 0x38f556bd: 0x38f556bd <a Buffer>
            length: 16384
            parent: 0x38f60e09 <a SlowBuffer>#26#
            offset: 0
#12# 0x38f93a91: 0x38f93a91 <JS Function>
#13# 0x38fabf71: 0x38fabf71 <an Arguments>
            length: 1
            callee: 0x38f93f85 <JS Function>#36#
#14# 0x38f93f45: 0x38f93f45 <JS Function>
#15# 0x38fadb01: 0x38fadb01 <an Object>
              data: 0x2d575f75 <JS Function parse>#37#
               end: 0x38fada35 <JS Function>#38#
             pause: 0x38fae5c1 <JS Function>#39#
#16# 0x38fadb9d: 0x38fadb9d <JS Array[1]>
                 0: 0x38fb05c5 <a Buffer>#2#
#17# 0x38fadc09: 0x38fadc09 <JS Function>
            length: 0
#18# 0x38fadca9: 0x38fadca9 <an Object>
#19# 0x38fac43d: 0x38fac43d <a TarHeader>
             block: 0x38fac3d9 <a Buffer>#40#
        cksumValid: 0x258080b1 <true>
              path: 0x38fac5c9 <String[30]: PaxHeader/package/package.json>
              mode: 420
               uid: 0x38fad001 <Number: 1916975748>
               gid: 0x38fad139 <Number: 1700319516>
              size: 1677
             mtime: 0x38fad265 <Number: 1392064404>
             cksum: 7170
              type: 0x51615be5 <String[1]: x>
          linkpath: 0x5160812d <String[0]: >
             ustar: 0x38fad48d <String[6]\: ustar\x00>
          ustarver: 0x38fad4d5 <String[2]: 00>
             uname: 0x5160812d <String[0]: >
             gname: 0x5160812d <String[0]: >
            devmaj: 0
            devmin: 0
              fill: 0x5160812d <String[0]: >
#20# 0x38fadcd5: 0x38fadcd5 <an Object>
#21# 0x38fadd05: 0x38fadd05 <an Object>
#22# 0x38fae435: 0x38fae435 <an Object>
#23# 0x38fae4b5: 0x38fae4b5 <JS Array[0]>
#24# 0x38fae50d: 0x38fae50d <JS Array[3]>
                 0: 78
                 1: 79
                 2: 68
#25# 0x38fae52d: 0x38fae52d <JS Array[0]>
#26# 0x38f60e09: 0x38f60e09 <a SlowBuffer>
            length: 16384
#27# 0x38f430b5: 0x38f430b5 <an Object>
             entry: 0x38f519f9 <JS Array[3]>#41#
            unpipe: 0x38f51a09 <JS Function onunpipe>#42#
             drain: 0x38f51a2d <JS Function>#43#
             error: 0x38f51a51 <JS Array[3]>#44#
             close: 0x38f51a61 <JS Array[3]>#45#
            finish: 0x38f51a71 <JS Function g>#46#
              data: 0x38fac10d <JS Function ondata>#47#
               end: 0x38fac1c1 <JS Function cleanup>#48#
#28# 0x38f4d331: 0x38f4d331 <an Object>
#29# 0x38f4d33d: 0x38f4d33d <JS Array[1]>
                 0: 0x38f556bd <a Buffer>#11#
#30# 0x38f4d34d: 0x38f4d34d <a Buffer>
            length: 512
            parent: 0x38f08845 <a SlowBuffer>#49#
            offset: 2560
#31# 0x38f4d365: 0x38f4d365 <an Object>
             error: 0x38f556d5 <JS Function>#50#
              data: 0x38f556f9 <JS Function>#51#
               end: 0x38f5571d <JS Function>#52#
             drain: 0x38f55741 <JS Function>#53#
#32# 0x38f4d3a9: 0x38f4d3a9 <an Object>
             ready: 0x38f55779 <JS Function>#54#
             error: 0x38fac289 <JS Array[2]>#55#
             drain: 0x38fac211 <JS Array[2]>#56#
             close: 0x38fac381 <JS Array[2]>#57#
#33# 0x38f297e1: 0x38f297e1 <an Object>
              type: 0x3334e6ed <String[9]: Directory>
              path: 0x38f2898d <String[86]: /usr/local/lib/node_modules/closurecompiler/node_modules/jsdoc/node_modules/underscore>
             strip: 1
               uid: 5000
               gid: 5000
            filter: 0x253df285 <JS Function>#35#
         Directory: 0x258080b1 <true>
              root: 0x25808081 <null>
            parent: 0x25808081 <null>
#34# 0x38f51b41: 0x38f51b41 <JS Array[0]>
#35# 0x253df285: 0x253df285 <JS Function>
#36# 0x38f93f85: 0x38f93f85 <JS Function>
#37# 0x2d575f75: 0x2d575f75 <JS Function parse>
#38# 0x38fada35: 0x38fada35 <JS Function>
#39# 0x38fae5c1: 0x38fae5c1 <JS Function>
#40# 0x38fac3d9: 0x38fac3d9 <a Buffer>
            length: 512
            parent: 0x38f60e09 <a SlowBuffer>#26#
            offset: 0
#41# 0x38f519f9: 0x38f519f9 <JS Array[3]>
                 0: 0x38f60cb9 <JS Function>#58#
                 1: 0x38f297bd <JS Function extractEntry>#59#
                 2: 0x38fac055 <JS Function>#60#
#42# 0x38f51a09: 0x38f51a09 <JS Function onunpipe>
#43# 0x38f51a2d: 0x38f51a2d <JS Function>
#44# 0x38f51a51: 0x38f51a51 <JS Array[3]>
                 0: 0x38f60d25 <JS Function onerror>#61#
                 1: 0x38f60db5 <JS Function>#62#
                 2: 0x38fac19d <JS Function onerror>#63#
#45# 0x38f51a61: 0x38f51a61 <JS Array[3]>
                 0: 0x38f60dd9 <JS Function g>#64#
                 1: 0x38f29749 <JS Function cb>#65#
                 2: 0x38fac1c1 <JS Function cleanup>#48#
#46# 0x38f51a71: 0x38f51a71 <JS Function g>
          listener: 0x38f60d6d <JS Function onfinish>#66#
#47# 0x38fac10d: 0x38fac10d <JS Function ondata>
#48# 0x38fac1c1: 0x38fac1c1 <JS Function cleanup>
#49# 0x38f08845: 0x38f08845 <a SlowBuffer>
            length: 8192
              used: 5248
#50# 0x38f556d5: 0x38f556d5 <JS Function>
#51# 0x38f556f9: 0x38f556f9 <JS Function>
#52# 0x38f5571d: 0x38f5571d <JS Function>
#53# 0x38f55741: 0x38f55741 <JS Function>
#54# 0x38f55779: 0x38f55779 <JS Function>
#55# 0x38fac289: 0x38fac289 <JS Array[2]>
                 0: 0x38f5579d <JS Function>#67#
                 1: 0x38fac19d <JS Function onerror>#63#
#56# 0x38fac211: 0x38fac211 <JS Array[2]>
                 0: 0x38f557c1 <JS Function>#68#
                 1: 0x38fac131 <JS Function ondrain>#69#
#57# 0x38fac381: 0x38fac381 <JS Array[2]>
                 0: 0x38f557e5 <JS Function>#70#
                 1: 0x38fac1c1 <JS Function cleanup>#48#
#58# 0x38f60cb9: 0x38f60cb9 <JS Function>
#59# 0x38f297bd: 0x38f297bd <JS Function extractEntry>
#60# 0x38fac055: 0x38fac055 <JS Function>
#61# 0x38f60d25: 0x38f60d25 <JS Function onerror>
#62# 0x38f60db5: 0x38f60db5 <JS Function>
#63# 0x38fac19d: 0x38fac19d <JS Function onerror>
#64# 0x38f60dd9: 0x38f60dd9 <JS Function g>
          listener: 0x38f60d49 <JS Function onclose>#71#
#65# 0x38f29749: 0x38f29749 <JS Function cb>
#66# 0x38f60d6d: 0x38f60d6d <JS Function onfinish>
#67# 0x38f5579d: 0x38f5579d <JS Function>
#68# 0x38f557c1: 0x38f557c1 <JS Function>
#69# 0x38fac131: 0x38fac131 <JS Function ondrain>
#70# 0x38f557e5: 0x38f557e5 <JS Function>
#71# 0x38f60d49: 0x38f60d49 <JS Function onclose>
=====================

Aborted
[  7.14 ######### ] ~ $

Even after clearing the cache (npm cache clean and changing ownership of all folders used by npm, the issue still persist.

My initial guess was probably node was failing to parse the received json data correctly, but all effort I have made seem not to do the trick.

2条回答
Animai°情兽
2楼-- · 2019-08-03 22:06

Thanks again smikes.

I tried the suggestion but that couldn't get it to work, so I eventually resulted to building from source again. My initial build was based on v0.10.35 so I decided to check the repo for version of nodejs that has a pre-built for arm. As at now, the latest version of nodejs is v0.11.14, but the version that has a pre-built binary for arm was v0.11.12

I then decided to go with v0.11.12 with the hope that if it was successfully compiled for arm-pi it might work for me to. I downloaded the source and extracted it.

To make life a bit easier and eventually avoid sudoing each time I use node and npm, I created a shebang like so (build.sh) and save at root directory of the extracted file. Since my architecture is arm based (version 7), I used the flag to guide my g++ and gcc appropriately.

#!/bin/bash
export CFLAGS='-march=armv7-a'
export CXXFLAGS='-march=armv7-a'
./configure --prefix=$HOME/local/nodejs
make install

I then make the build.sh file executable

sudo chmod a+x build.sh

The installation went successfully (took some hours to build though), by executing the build.sh file

./build.sh

I then exported NODE_PATH to my ~/.bashrc profile like so..

nano ~/.bashrc
export NODE=$HOME/local/nodejs
export NODE_PATH=$NODE/lib/node_modules
export PATH=$NODE/bin:$PATH

Quickly enabled the config

source ~/.bashrc

Then tested the installation

node -v

v0.11.12

npm -v

1.4.3

Finally update npm

npm -g install npm@latest
npm -v

2.1.18

查看更多
Rolldiameter
3楼-- · 2019-08-03 22:31

This looks like a failure when parsing a package.json file, sure, but even that should not lead to terminating the node process with a stack trace. Are you able to rule out hardware (e.g., memory) problems?

Could you please upload your npm-debug.log as a gist http://gist.github.com? If possible, run npm with at least one -d flag to increase the logging level.

There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.4.28. Can you try updating your npm installation?

To update npm, run npm -g install npm@latest

For some Linux distributions (Debian/Ubuntu and RedHat/CentOS), the latest node version provided by the distribution may lag behind the stable version. Here are instructions from NodeSource on getting the latest node.

Thanks!

查看更多
登录 后发表回答