[bz5857453] Cannot install Mojito on Node 0.8 #596

Closed
rwaldura opened this Issue Oct 5, 2012 · 6 comments

Comments

Projects
None yet
3 participants
Contributor

rwaldura commented Oct 5, 2012

Mojito depends on versions of connect and express, which both say they don't support Node 0.8.
Therefore, Mojito doesn't support Node 0.8.

$ node --version
v0.8.2

$ npm i mojito
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: connect@1.8.2
npm ERR! Required: {"node":">= 0.4.1 < 0.7.0"}
npm ERR! Actual:   {"npm":"1.1.21-1","node":"0.8.2"}

$ npm info mojito dependencies
{ async: '*',
  colors: '*',
  commander: '1.0.1',
  connect: '1.8.2',
  express: '2.5.2',

$ npm info express@2.5.2 engines
{ node: '>= 0.4.1 < 0.7.0' }

$ npm info connect@1.8.2 engines
{ node: '>= 0.4.1 < 0.7.0' }

See also #80 and #126, related.

Contributor

dmitris commented Oct 8, 2012

I can install nojito ok with node v0.8.11 and npm 1.1.62 even though there are warnings:

npm WARN engine connect@1.8.2: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"v0.8.11","npm":"1.1.62"})
npm WARN engine express@2.5.2: wanted: {"node":">= 0.4.1 < 0.7.0"} (current: {"node":"v0.8.11","npm":"1.1.62"})

Is it a npm configuration difference or something else?

Contributor

isao commented Oct 8, 2012

yes, I am running mojito on node 0.8.11 and have been on 0.8.x since pull #498 landed early last month, and the current mojito package.json says:

"engines": {
    "node": ">0.4",
    "npm": ">1.0"
},

mojito isn't really using express (at least the ones that would break on node 0.8). I think we can remove express dependency and upgrade connect without affecting mojito.

Contributor

isao commented Oct 8, 2012

so just changing the declared dependency versions of connect & express to "*" seems to work fine, at least with examples/newsboxes (with some deprecation warnings).

% git clone myfork node8fork
% cd node8fork

# edit package.json #
% egrep 'connect|express' /package.json
        "connect": "*",
        "express": "*",

% cd examples/newsboxes/
% npm link ../../
% npm ls | egrep 'connect|express'
├─┬ connect@2.5.0
├─┬ express@3.0.0rc4
│ ├─┬ connect@2.4.4
│ ├─┬ express@2.5.2
│ │ ├─┬ connect@1.8.7
│ ├─┬ express@2.5.11
│ │ ├─┬ connect@1.9.2
% which mojito
node_modules/.bin/mojito

% mojito start
path.existsSync is now called `fs.existsSync`.
Warning: express.createServer() is deprecated, express
applications no longer inherit from http.Server,
please use:

  var express = require("express");
  var app = express();
...
✔  Mojito started 'mojito_newsboxes' on http://localhost:8000/
Contributor

rwaldura commented Oct 19, 2012

see also arrow#24

Contributor

rwaldura commented Oct 19, 2012

Contributor

isao commented Oct 31, 2012

arrow 0.64 fixes the sub-dependency issue, and npm i mojito@0.4.8 on node 0.8 doesn't display any warnings.

should be ok now. thanks @dmitris

isao closed this Oct 31, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment