Npm install -g bitcore in official Docker "node" container fails and more

After running for 30 minutes or so, this show up:

gypmake: Entering directory '/usr/local/lib/node_modules/bitcore/node_modules/bitcore-node/build’
make: *** No rule to make target ‘Release/obj.target/libbitcoind/src/libbitcoind.o’, needed by ‘Release/obj.target/bitcoind.node’. Stop.
make: Leaving directory '/usr/local/lib/node_modules/bitcore/node_modules/bitcore-node/build’
info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:100:13)
gyp ERR! stack at ChildProcess.emit (events.js:185:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “–debug=false” "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/bitcore/node_modules/bitcore-node
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm info lifecycle bitcore-node@1.0.1~install: Failed to exec install script
npm WARN install:bitcore-node@1.0.1 bitcore-node@1.0.1 install: ./bin/install
npm WARN install:bitcore-node@1.0.1 Exit status 1

So, reading back up the log, right when it starts this flies past unnoticed:

npm WARN engine bitcore-node@1.0.1: wanted: {“node”:"^0.12 || ^4.2"} (current: {“node”:“5.5.0”,“npm”:“3.3.12”})

Wow, thanks for the 30 minutes of suspense. Why doesn’t it just fail right there?

What I also noticed is that some of the git clones clone the whole histories of the repositories. Please add a --depth 1 to the git commands in the build scripts.

Node.js 4 is supported currently with distributed binaries: https://bitcore.io/guides/full-node

A “.deb” package I think would greatly help with installation so that the Node.js version is included, or specified as a dependency.

Let me clarify:
It works fine in the appropriate node version container.

But it should specify more clearly that it only works on V4. And if it
detects V5, it should just fail right up front, before it wastes 30 mins of
your time and bandwidth.