2

I am facing problems in installing Meteorite.

I'm currently going to start working on Telescope Project which is hosted here.

I have downloaded the Telescope into D:\Meteor\Telescope, and installed Meteorite using npm install -g meteorite in command prompt.

But when I rum meteorite using mrt command I get following errors:

Stand back while Meteorite does its thing

Installing Meteor

  branch: https://github.com/meteor/meteor.git#master

Installing smart packages

C:\Users\Snowflax\AppData\Roaming\npm\node_modules\meteorite\lib\sources\git.js:108
        throw "There was a problem cloning repo: " + self.url;
                                                   ^
There was a problem cloning repo: https://github.com/meteor/meteor.git

What is going wrong here? I have Meteor Preview 0.4.2 already installed on my Windows 7 System. Is there any cross-platform issues? Any help will be appriciated.

sohel khalifa
  • 5,602
  • 3
  • 34
  • 46

2 Answers2

1

The exception message comes from meteorite lib/sources/git.js:

GitSource.prototype._clone = function(fn) {
  var self = this;
  if (!fs.existsSync(this.sourcePath)) {
    exec('git clone ' + self.url + ' ' + this.sourcePath, function(err, stdout, stderr) {
      if (err)
        throw "There was a problem cloning repo: " + self.url;
      fn();
    });
  } else {
    fn();
  }
};

You need to add to the exception message the this.sourcePath value, and from there, repeat the git clone command manually (in your own git-cmd DOS session) in order to see why it fails.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I have done what you've said, and `this.SourcePath` now gives `undefined`. What could be a problem here? – sohel khalifa Jan 07 '13 at 12:06
  • 1
    @SohelKhalifa it is a configuration issue: meteorite should know where to clone this repo: `this.sourcePath` should be defined, I suppose through https://github.com/oortcloud/meteorite/blob/master/lib/sources/git.js#L28-L30, which comes from https://github.com/oortcloud/meteorite/blob/master/lib/sources/git.js#L14, defined at https://github.com/oortcloud/meteorite/blob/master/lib/meteorite.js#L109-L112... so, is it possible you haven't defined environment variable `HOME`? (not defined by default in Windows) – VonC Jan 07 '13 at 12:15
  • @VonC.. yeah there is no any Env. variable defined `HOME` in my system. can you please tell what `HOME` variable contains? I think `USERPROFILE` is also same as `HOME`. But these is no `USERPROFILE` variable either. – sohel khalifa Jan 07 '13 at 13:07
  • @SohelKhalifa `HOME` can point to any directory of your choice. If you are using git in a `git-cmd.bat` session, it is defined for you: http://stackoverflow.com/a/13153000/6309. In any case, make sure to execute your `mtr` command in a session where `HOME` is defined (type `set HOME` in your DOS session to see if a value is displayed). – VonC Jan 07 '13 at 13:23
1

I finally could fix the problem, by uninstalling Meteor and meteorite and installing npm here's the trick:

First remove meteor

  • $ sudo rm -rf /usr/local/bin/meteor (path depending on the distribution)
  • $ sudo rm -rf ~/.meteor ~/.meteorite ~/.meteorsession
  • $ sudo mrt uninstall
  • $ sudo mrt uninstall --system

make sure to have the right permissions:

  • $ sudo chown -R 'whoami' ~/.npm
  • Then install again:
    download and install node from here: http: //nodejs.org/download/

  • $ curl https://install.meteor.com | sh
  • $ sudo -H npm install -g meteorite
  • in last resource there is a workaround, before i could fix the issue i was force to clone manually from Github, not the nicest approach but i will work

    1) $ mrt add 'package-you-want-to-install'

    2) then copy the link of the git repository i.e.:(https://github.com/EventedMind/iron-router.git)

    3) navigate to packages directory $ cd packages

    4) then clone the package manually $ git clone https://github.com/EventedMind/iron-router.git