LockerProject/Locker — Issue #485: runTests.js: Cannot find module 'xmlhttprequest'.  Cannot call method 'ensureIndex' of undefined.
Author: trentlarson
Created: 2011-12-04 01:04:29+00:00
State: open

When I 'node runTests.js' in the tests directory I get a bunch of successes, but then I get the following:

```
♢ UseUI

Socket.IO A GET to /socket.io/?t=test
✓ should respond with 200
✓ returns it is ready
'Error: Cannot find module \'xmlhttprequest\'
at Function._resolveFilename (module.js:317:11)
at Function._load (module.js:262:25)
at require (module.js:346:19)
at Object.request (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/socket.io-client/lib/util.js:159:26)
at Socket.handshake (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/socket.io-client/lib/socket.js:149:25)
at Socket.connect (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/socket.io-client/lib/socket.js:202:10)
at new Socket (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/socket.io-client/lib/socket.js:62:12)
at Object.connect (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/socket.io-client/lib/io.js:192:16)
at Object. (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/tests/app-useui-test.js:40:31)
at run (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/vows/lib/vows/suite.js:128:31)'
```

That last is repeated many times. Then there's a pause, and then I get the following repeated many times:

```
'TypeError: Cannot call method \'ensureIndex\' of undefined
at Object.addCollection (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/Common/node/ldatastore.js:36:40)
at Object.addCollection (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/Common/node/lsyncmanager.js:21:16)
at processData (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/Common/node/lsyncmanager.js:395:15)
at /Users/tlarson/Documents/dev/locker/lockerbox/Locker/Common/node/lsyncmanager.js:359:53
at /Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/async/lib/async.js:97:13
at Array.forEach (native)
at /Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/async/lib/async.js:26:24
at Object.forEach (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/node_modules/async/lib/async.js:96:9)
at /Users/tlarson/Documents/dev/locker/lockerbox/Locker/Common/node/lsyncmanager.js:359:15
at Object.init (/Users/tlarson/Documents/dev/locker/lockerbox/Locker/Common/node/ldatastore.js:21:30)'
```

After that a pause, then that part is repeated again, followed by a pause, followed by repeated error... endlessly.

This is code checked out yesterday (Dec 2). I'm running on a Mac OSX 10.6.8.