Do the normal fork, patch, pull-request dance. If you don't know what that means or need any help, let us know.
Sometimes git can get into broken states if weird things happen and the error messages you get as a result can be confusing.
So before reporting errors, please first try cleaning up all of Meteorite's files and starting again (in your app's dir):
mrt uninstall
mrt uninstall --system
mrt
If you are seeing permission errors (e.g. EACCESS
, talk of needing to be Administrator) please read: https://github.com/oortcloud/meteorite#permission-woes
If you are still seeing problems after trying the above, or you want to figure out why you need to do it, please remember that Meteorite is at heart a very simple script that isn't really doing much.
Remember that when you mrt install
or just run mrt
, Meteorite is doing the following:
- Inspecting your
smart.json
to figure out what packages need to be installed. - Cloning them into
~/.meteorite/sources/<AUTHOR>/<REPO_NAME>
, checking out the right branch, git pulling. - Copying the files into
~/.meteorite/packages/<NAME>/<AUTHOR>/<REPO_NAME>/<COMMIT>/
- Symlinking packages from
packages/
to that location. - [Possibly] Running Meteor from a git checkout (similarly, in
~/.meteorite/meteors/<NAME>/<AUTHOR>/<REPO_NAME>/<COMMIT>/
).
You can inspect smart.lock
for some insights too.
Helpful debugging you can do is:
- Manually doing the same, seeing if you see the same error.
- Digging around in
~/.meteorite
and seeing if git checkouts have gotten into a broken state.
Meteorite is fairly brittle as it calls out to commandline git all the time, and problems can can sometime get missed. We appreciate you going the extra mile.
Use npm link
to install your forked copy of Meteorite, then do something to make it more awesome.
We have a pretty good start at an acceptance test suite but it could be a lot better. Help us fix this!
To run meteorite's test suite, you'll need a local atmosphere instance and a bit of setup for the meteorite dependencies. Here are the steps to get those set up:
$ cd ~/tmp
$ git clone https://github.com/oortcloud/atmosphere.git
$ cd atmosphere/app
$ mrt --port 3333
# in a separate terminal...
$ cd ~/tmp
$ git clone [email protected]:oortcloud/meteorite.git
$ cd meteorite
$ git submodule update --init
$ npm install
You'll need to ensure you have a git executable available at your PATH so which git
can find it.
You can find out where your current git command is being executed like this:
$ which git
The tests expect a local version of atmosphere running on port 3333, with a user 'test' with password 'testtest'. So now that the local atmosphere app is running, point your browser to http://localhost:3333/ and sign up with the following credentials:
- Username: test
- Password: testtest
Once the above setup steps are complete, here's how you run the meteorite test suite:
$ npm test
# or
$ mocha spec/unit spec/acceptance -t 240000 -R spec
Because Meteorite downloads Git repositories, we cache the results so the test suite will run fast. It will be slow the first time.
When the related repositories change, you'll need to flush the cache.
$ npm run-script flushcache
If you get a timeout after the "Ensuring local atmosphere is running with the right packages" message, then it means you haven't started your local atmosphere app yet or its not running on port 3333.
$ mrt --port 3333
$ npm test
> [email protected] test /Users/alanning/tmp/meteorite
> mocha spec/unit spec/acceptance -t 240000 -R spec
Preparing..
Ensuring we have the dev bundle for system meteor
Ensuring local atmosphere is running with the right packages
1) "before all" hook
0 passing (4m)
1 failing
1) "before all" hook:
Error: timeout of 240000ms exceeded
at null.<anonymous> (/Users/alanning/tmp/meteorite/node_modules/mocha/lib/runnable.js:175:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
npm ERR! weird error 1
npm ERR! not ok code 0
This means the local atmosphere app is running but the test user hasn't been created yet. Point your browser to http://localhost:3333/
and signup with these credentials:
- Username: test
- Password: testtest
This means that your meteorite version is out of date. Do an npm uninstall and reinstall like so:
$ npm uninstall -g meteorite
$ npm install -g meteorite
Note: If your system requires root access to install global npm packages, make sure you use the -H flag:
$ sudo -H npm uninstall -g meteorite
$ sudo -H npm install -g meteorite
Figure out work-arounds for the following issues, using a patched version of mocha if we have to.
- Can't use mocha's recursive option because it breaks trying to process files in the test apps as test files.
- Can't seem to use
--watch
.