NPM install errors when installing image compression modules

Mac 10.7.5
Node.js 5.10.1
NPM 3.8.6.

Encountering a series of errors during npm install (listed below).

I deleted themes/sage/node_modules ran rm -rf ~/.npm && npm cache clean, then ran npm install.
I completely removed NPM, re-installed and changed usr/local/lib/node_modules permissions to drwxr-xr-x. And drank a LOT of coffee. Yet, here I am with this persistent bugger. SOS!

> pngcrush-bin@3.0.0 postinstall /Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/pngcrush-bin
> node lib/install.js

  ⚠ The `/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/pngcrush-bin/vendor/pngcrush` binary doesn't seem to work correctly
  ⚠ pngcrush pre-build test failed
  ℹ compiling from source
  ✖ HTTPError: Response code 404 (Not Found)
    at EventEmitter.<anonymous> (/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/got/index.js:192:24)
    at emitOne (events.js:90:13)
    at EventEmitter.emit (events.js:182:7)
    at Immediate._onImmediate (/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/got/index.js:58:8)
    at tryOnImmediate (timers.js:534:15)
    at processImmediate [as _immediateCallback] (timers.js:514:5)

> optipng-bin@3.1.1 postinstall /Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/optipng-bin
> node lib/install.js

  ⚠ The `/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/optipng-bin/vendor/optipng` binary doesn't seem to work correctly
  ⚠ optipng pre-build test failed
  ℹ compiling from source
  ✔ optipng built successfully

> jpegtran-bin@3.0.6 postinstall /Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/jpegtran-bin
> node lib/install.js

  ⚠ The `/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/jpegtran-bin/vendor/jpegtran` binary doesn't seem to work correctly
  ⚠ jpegtran pre-build test failed
  ℹ compiling from source
  ✖ Error: touch configure.ac aclocal.m4 configure Makefile.am Makefile.in && ./configure --disable-shared --prefix="/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/jpegtran-bin/vendor" --bindir="/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/jpegtran-bin/vendor" && make install
Command failed: ./configure --disable-shared --prefix="/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/jpegtran-bin/vendor" --bindir="/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/jpegtran-bin/vendor"
configure: error: installation or configuration problem: assembler cannot create object files.

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:475:12)

> gifsicle@3.0.3 postinstall /Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/gifsicle
> node lib/install.js

  ⚠ The `/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/gifsicle/vendor/gifsicle` binary doesn't seem to work correctly
  ⚠ gifsicle pre-build test failed
  ℹ compiling from source
  ✖ Error: autoreconf -ivf && ./configure --disable-gifview --disable-gifdiff --prefix="/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/gifsicle/vendor" --bindir="/Users/samiam/Sites/mysite.com/site/web/app/themes/mysite/node_modules/gifsicle/vendor" && make install
Command failed: autoreconf -ivf
/bin/sh: autoreconf: command not found

    at ChildProcess.exithandler (child_process.js:202:12)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:475:12)

Based on the “HTTPError: Response code 404 (Not Found)” bit I see above, it’s entirely possible that it’s getting the 404 while trying to get package components over the network. This happens sometimes, hopefully it will just go away the next time you try it out.

@deal did you ever figure this out?