Closed emkay closed 12 years ago
Confirmed tests breaking with various versions of Express. It seems to work with Express 3, but not with Express 2. Please lock these down.
I was Planning to lock express with v 2.x, what tests are failing with express 3 ?
Btw I am ooo till Sunday, will look into all the pull requests first thing Monday morning, sorry for the delay.
The following error happens when arrow_server tries to run using Mojito's version of Express (2.5.2):
/Users/mridgway/Projects/mojito/node_modules/yahoo-arrow/arrow_server/server.js:89
var app = express();
^
TypeError: object is not a function
at Object.<anonymous> (/Users/mridgway/Projects/mojito/node_modules/yahoo-arrow/arrow_server/server.js:89:11)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Express() changed to a function instead of an object in 3.0, meaning that arrow_server is only compatible with Express 3. (See: https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x)
I changed that since the test was failing when we use express 3.x: https://github.com/yahoo/arrow/pull/9/files You will need to revert the above changes if you need to use express 2.x.
I don't want to use it with Express 2.x, but because Arrow's package.json does not specify what version it works with, it assumes that it works with the already installed Express 2.x. The package.json needs to be locked down to versions of dependencies that it works with, so that it knows to install the working version if an older version already exists.
This is fixed now, we are using express 2.x, and all dependencies have fixed versions now.
Instead of wildcards we should use version numbers for our dependencies. This causes new versions of modules that we might not want, like YUI 3.7.0pr1 which was just pushed. I believe it also may have cause tests from breaking because of the new version of express. cc @ktslwy