Errors with npm and gulp on scotchbox (vagrant)

I installed SAGE on a fresh installation of Vagrant ScotchBox Machine (OSX 10.11.3 host).
During npm install process, I received output like this:

> gifsicle@3.0.3 postinstall /var/www/public/mapeicadd/node_modules/gifsicle
> node lib/install.js

  ⚠ Couldn't execute the `/var/www/public/mapeicadd/node_modules/gifsicle/vendor/gifsicle` binary. Make sure it has the right permissions.
  ⚠ gifsicle pre-build test failed
  ℹ compiling from source
  ✖ Error: autoreconf -ivf && ./configure --disable-gifview --disable-gifdiff --prefix="/var/www/public/mapeicadd/node_modules/gifsicle/vendor" --bindir="/var/www/public/mapeicadd/node_modules/gifsicle/vendor" && make install
Command failed: /bin/sh -c autoreconf -ivf
/bin/sh: 1: autoreconf: not found

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

After that, when I run gulp the process stops with this error:

vagrant@scotchbox:/var/www/public/mapeicadd$ gulp
[20:18:16] Using gulpfile /var/www/public/mapeicadd/gulpfile.js
[20:18:16] Starting 'clean'...
[20:18:16] Finished 'clean' after 30 ms
[20:18:16] Starting 'default'...
[20:18:16] Starting 'build'...
[20:18:16] Starting 'wiredep'...
[20:18:17] Finished 'default' after 711 ms
[20:18:17] Finished 'wiredep' after 798 ms
[20:18:17] Starting 'styles'...
[20:18:23] Finished 'styles' after 6.36 s
[20:18:23] Starting 'jshint'...
[20:18:24] Finished 'jshint' after 317 ms
[20:18:24] Starting 'scripts'...
[20:18:27] Finished 'scripts' after 3.35 s
[20:18:27] Starting 'fonts'...
[20:18:27] Starting 'images'...
    throw errnoException(err, 'spawn');

Error: spawn EACCES
    at exports._errnoException (util.js:860:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:339:9)
    at Through2._transform (/var/www/public/mapeicadd/node_modules/imagemin-gifsicle/index.js:35:12)
    at Through2.Transform._read (/var/www/public/mapeicadd/node_modules/imagemin-gifsicle/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Through2.Transform._write (/var/www/public/mapeicadd/node_modules/imagemin-gifsicle/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/var/www/public/mapeicadd/node_modules/imagemin-gifsicle/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/var/www/public/mapeicadd/node_modules/imagemin-gifsicle/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Through2.Writable.write (/var/www/public/mapeicadd/node_modules/imagemin-gifsicle/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at PassThrough.ondata (/var/www/public/mapeicadd/node_modules/readable-stream/lib/_stream_readable.js:531:20)

This is the second time I started from scratch with a new virtual machine, can someone help me?


UPDATE: i moved my theme in a folder different from Scotchbox/VirtualBox shared folder /var/www/public, I ran npm install and gulp and all works fine without errors. Why???

You probably won’t get much help with the Scotch box here, I’d try the Scotch Slack

Thanks @paul_tibbetts, this morning I solved, but i don’t really understood why.

It probably is a permission issue because npm install returns errors in the virtualbox shared folder, but it works in a folder inside the virtual machine. Finally I mounted the shared folder in nfs mode ( and everything worked out perfectly.

1 Like