Node.js NPM install express crashes!

Started by maiorfi, April 01, 2014, 05:23:58 pm

Previous topic - Next topic

maiorfi

Hi.

I just installed .deb package for latest nodejs targeted to armhf architecture, by running:

sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb

and

sudo dpkg -i node_latest_armhf.deb

Everything seems fine, both on A10 and A20 olinuxino boards, but when I install express via npm (i.e. npm install express) I get an awful error message!

Something like:

...
npm http GET https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.0.1.tgz
npm http GET https://registry.npmjs.org/bytes/-/bytes-0.2.1.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.6.6.tgz
npm http 200 https://registry.npmjs.org/serve-index/-/serve-index-1.0.1.tgz
npm http 200 https://registry.npmjs.org/vhost/-/vhost-1.0.0.tgz
npm http GET https://registry.npmjs.org/serve-static/-/serve-static-1.0.2.tgz
npm http 200 https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
abort: (ÐK⋽ìðO½èOYþê 0Ÿå

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

Security context: 0x44f34659 <JS Object>#0#
    1: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x5bdb7e61 <an ExtendedHeader>#1#,c=0x5bdbac9d <a Buffer>#2#)
    2: emit [events.js:95] (this=0x5bdb7e61 <an ExtendedHeader>#1#,type=0x56a1474d <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=0x5bdb7e61 <an ExtendedHeader>#1#)
    8: _read [native v8natives.js:1594] (this=0x5bdb7e61 <an ExtendedHeader>#1#)
    9: write [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:68] (this=0x5bdb7e61 <an ExtendedHeader>#1#,c=0x5bdbac9d <a Buffer>#2#)
   10: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:104] (this=0x5bd61f41 <an Extract>#3#,c=0x5bdbac9d <a Buffer>#2#)
   11: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:~45] (this=0x5bd61fc9 <a BlockStream>#4#,c=0x5bdbac9d <a Buffer>#2#)
   12: emit [events.js:95] (this=0x5bd61fc9 <a BlockStream>#4#,type=0x56a1474d <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=0x5bd61fc9 <a BlockStream>#4#,flush=0x44f08091 <undefined>)
   15: arguments adaptor frame: 0->1
   16: resume [/usr/local/lib/node_modules/npm/node_modules/block-stream/block-stream.js:~55] (this=0x5bd61fc9 <a BlockStream>#4#)
   17: arguments adaptor frame: 1->0
   18: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/reader.js:~249] (this=0x5bd61f41 <an Extract>#3#,who=0x44f08091 <undefined>)
   19: arguments adaptor frame: 0->1
   20: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:~255] (this=0x5bd8f771 <an Entry>#5#)
   21: emit [events.js:92] (this=0x5bd8f771 <an Entry>#5#,type=0x56a164b9 <String[6]: resume>)
   22: resume [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:~90] (this=0x5bd8f771 <an Entry>#5#)
   23: resume [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/collect.js:62] (this=0x44f34701 <JS Global Object>#6#)
   24: unblockEntry [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/collect.js:43] (this=0x44f34701 <JS Global Object>#6#)
   25: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/collect.js:47] (this=0x5bd8f771 <an Entry>#5#,dest=0x5bd92321 <a FileWriter>#7#)
   26: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:143] (this=0x5bd92321 <a FileWriter>#7#)
   27: emit [events.js:92] (this=0x5bd92321 <a FileWriter>#7#,type=0x275e1691 <String[5]: ready>)
   28: /* anonymous */ [/usr/local/lib/node_modules/npm/node_modules/fstream/lib/file-writer.js:45] (this=0x5bdb073d <a WriteStream>#8#,fd=15)
   29: emit [events.js:95] (this=0x5bdb073d <a WriteStream>#8#,type=0x56a1f615 <String[4]: open>)
   30: arguments adaptor frame: 2->1
   31: /* anonymous */ [fs.js:1662] (this=0x5bdb073d <a WriteStream>#8#,er=0x44f08081 <null>,fd=15)
   35: /* anonymous */(aka /* anonymous */) [native v8natives.js:1597] (this=0x44f08091 <undefined>)
   36: arguments adaptor frame: 2->0
   37: done [/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:~130] (this=0x5bdb08cd <an OpenReq>#9#,er=0x44f08081 <null>,result=15)
   38: done [/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:~60] (this=0x5bdb08cd <an OpenReq>#9#,er=0x44f08081 <null>,fd=15)
   42: /* anonymous */ [native v8natives.js:1597] (this=0x44f08081 <null>)
   43: arguments adaptor frame: 2->0
   45: oncomplete [fs.js:107] (this=0x5bdb0a81 <an Object>#10#)
   46: arguments adaptor frame: 2->0

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

[1]: _parse(aka parse) [/usr/local/lib/node_modules/npm/node_modules/tar/lib/extended-header.js:~61] (this=0x5bdb7e61 <an ExtendedHeader>#1#,c=0x5bdbac9d <a Buffer>#2#) {
  // stack-allocated locals
  var i = 493
  var l = 512
  var b = 57
  var val = 0x5bdbd051 <String[4]: 4096>
  // expression stack (top to bottom)
  [05] : 0
  [04] : 2086114
--------- 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??    if (this._size >= 0 && this._fieldPos > this._size) {?      error(this, "field exceed...

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

[2]: emit [events.js:95] (this=0x5bdb7e61 <an ExtendedHeader>#1#,type=0x56a1474d <String[4]: data>) {
  // stack-allocated locals
  var arguments = 0x5bdbadbd <an Arguments>#11#
  var er = 0x44f08091 <undefined>
  var handler = 0x4333c84d <JS Function parse>#12#
  var len = 0x44f08091 <undefined>
  var args = 0x44f08091 <undefined>
  var i = 0x44f08091 <undefined>
  var listeners = 0x44f08091 <undefined>
  // heap-allocated locals
  var type = 0x56a1474d <String[4]: data>
  // expression stack (top to bottom)
  [08] : 0x5bdbac9d <a Buffer>#2#
  [07] : 0x5bdb7e61 <an ExtendedHeader>#1#
--------- s o u r c e   c o d e ---------
function (type) {?  var er, handler, len, args, i, listeners;??  if (!this._events)?    this._events = {};??  // If there is no 'error' event listener then throw.?  if (type === 'error') {?    if (!this._events.error ||?        (typeof this._events.error === 'object' &&?         !this._events.error.length)) ...

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

[3]: arguments adaptor frame: 2->1 {
  // actual arguments
  [00] : 0x56a1474d <String[4]: data>
  [01] : 0x5bdbac9d <a Buffer>#2#  // not passed to callee
}

[4]: _read [/usr/local/lib/node_modules/npm/node_modules/tar/lib/entry.js:111] (this=0x5bdb7e61 <an ExtendedHeader>#1#) {
  // stack-allocated locals
  var chunk = 0x5bdbac9d <a Buffer>#2#
  var mql = 0x44f08091 <undefined>
  // expression stack (top to bottom)
  [04] : 0x5bdbac9d <a Buffer>#2#
  [03] : 0x56a1474d <String[4]: data>
  [02] : 0x5bdb7e61 <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=0x5bdb7e61 <an ExtendedHeader>#1#) {
  // stack-allocated locals
  var arguments = 0x5bdbad81 <an Arguments>#13#
  var c = 0x5bdbad91 <JS Array[2]>#14#
  var d = 0
  var e = 0x44f08091 <undefined>
  var f = 0x44f08091 <undefined>
  var g = 0x44f08091 <undefined>
  var h = 0x44f08091 <undefined>
  // expression stack (top to bottom)
  [11] : 0
  [10] : 2
  [09] : 0x5bdbad91 <JS Array[2]>#14#
  [08] : 0x5bdb7e61 <an ExtendedHeader>#1#
  [07] : 0x4ab991ad <JS Function>#15#
--------- 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:68] (this=0x5bdb7e61 <an ExtendedHeader>#1#,c=0x5bdbac9d <a Buffer>#2#) {
  // stack-allocated locals
  var ql = 0
  // expression stack (top to bottom)
  [01] : 0x5bdb7e61 <an ExtendedHeader>#1#
--------- s o u r c e   c o d e ---------
function (c) {?  if (this._ending) this.error("write() after end()", null, true)?  if (this._remaining === 0) {?    this.error("invalid bytes past eof")?  }??  // often we'll get a bunch of \0 at the end of the last write,?  // since chunks will always be 512 bytes when reading a tarball.?  if (c.length > th...

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

[10]: _process [/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:104] (this=0x5bd61f41 <an Extract>#3#,c=0x5bdbac9d <a Buffer>#2#) {
  // stack-allocated locals
  var entry = 0x5bdb7e61 <an ExtendedHeader>#1#
  var zero = 0x44f08091 <undefined>
  var i = 0x44f08091 <undefined>
  // expression stack (top to bottom)
  [04] : 0x5bdbac9d <a Buffer>#2#
  [03] : 0x5bdb7e61 <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:~45] (this=0x5bd61fc9 <a BlockStream>#4#,c=0x5bdbac9d <a Buffer>#2#) {
// optimized frame
}
[12]: emit [events.js:95] (this=0x5bd61fc9 <a BlockStream>#4#,type=0x56a1474d <String[4]: data>) {
  // stack-allocated locals
  var arguments = 0x5bdbaced <an Arguments>#16#
  var er = 0x44f08091 <undefined>
  var handler = 0x5bd62095 <JS Function>#17#
  var len = 0x44f08091 <undefined>
  var args = 0x44f08091 <undefined>
  var i = 0x44f08091 <undefined>
  var listeners = 0x44f08091 <undefined>
  // heap-allocated locals
  var type = 0x56a1474d <String[4]: data>
  // expression stack (top to bottom)
  [08] : 0x5bdbac9d <a Buffer>#2#
  [07] : 0x5bd61fc9 <a BlockStream>#4#
--------- s o u r c e   c o d e ---------
function (type) {?  var er, handler, len, args, i, listeners;??  if (!this._events)?    this._events = {};??  // If there is no 'error' event listener then throw.?  if (type === 'error') {?    if (!this._events.error ||?        (typeof this._events.error === 'object' &&?         !this._events.error.length)) ...

-----------------------------------------
}
...


splite