Report more details in the unsupported engine version error #2637

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@aadamowski

Hi!

I had an npm error when trying to install the express example using Nodejitsu "jitsu" utility.

The error was extremely unhelpful:

error:   Error running command install
error:   Unsupported
error:   Error: Unsupported
error:       at checkEngine (/usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:681:14)
error:       at Array.0 (/usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
error:       at LOOP (/usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
error:       at chain (/usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
error:       at installOne_ (/usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:658:3)
error:       at installOne (/usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:584:3)
error:       at /usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:471:9
error:       at /usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/async-map.js:54:35
error:       at Array.forEach (native)
error:       at /usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/async-map.js:54:11
info:    Nodejitsu not ok

With my change, the error message is much more informative and I've immediately discovered that I were using too much of a cutting edge node version:

error:   Error running command install
error:   Unsupported node version 0.8.2 (required: >= 0.4.1 < 0.7.0) or npm version 1.1.16 (required: undefined)
error:   Error: Unsupported node version 0.8.2 (required: >= 0.4.1 < 0.7.0) or npm version 1.1.16 (required: undefined)
error:       at checkEngine (/usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:680:14)
error:       at Array.0 (/usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
error:       at LOOP (/usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
error:       at chain (/usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
error:       at installOne_ (/usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:658:3)
error:       at installOne (/usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:584:3)
error:       at /usr/lib/node_modules/jitsu/node_modules/npm/lib/install.js:471:9
error:       at /usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/async-map.js:54:35
error:       at Array.forEach (native)
error:       at /usr/lib/node_modules/jitsu/node_modules/npm/node_modules/slide/lib/async-map.js:54:11
info:    Nodejitsu not ok
@domenic
Member
domenic commented May 11, 2013

Thanks for the contribution! Unfortunately it got a bit stale before anyone accepted it, and is no longer applicable :(.

As of some time in the 0.8 timeframe, npm only warns on engine restrictions (and does so somewhat informatively); it does not error and prevent installation.

@domenic domenic closed this May 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment