guillaume86 / tab-history

MRU tab switching for atom

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot install tab-history package

steph643 opened this issue · comments

Under Windows, installing tab-history fails with the following error:

npm http GET https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/property-accessors
npm ERR! not found: git
npm ERR! 
npm ERR! Failed using git.
npm ERR! This is most likely not a problem with npm itself.
npm ERR! Please check if you have git installed and in your PATH.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\Atom\\resources\\app\\apm\\node_modules\\atom-package-manager\\bin\\\\node.exe" "c:\\Program Files (x86)\\Atom\\resources\\app\\apm\\node_modules\\atom-package-manager\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "c:\\Program Files (x86)\\Atom\\resources\\app\\apm\\node_modules\\atom-package-manager\\.apmrc" "--userconfig" "C:\\Users\\Sylvain\\.atom\\.apmrc" "install" "C:\\Users\\Sylvain\\AppData\\Local\\Temp\\d-114114-6608-pvh634\\package.tgz" "--target=0.18.0" "--arch=ia32" "--msvs_version=2012"
npm ERR! cwd C:\Users\Sylvain\AppData\Local\Temp\apm-install-dir-114114-6608-1r0q50w
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.4
npm ERR! code ENOGIT
npm http 304 https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/mixto
npm http 304 https://registry.npmjs.org/underscore-plus
npm

This same error (git not found) happens with about 1/3rd of atom packages. The remaining 2/3rd have no problem.

A workaround might be to install git and ensure git.exe is referenced in the PATH environment variable (see emmetio/emmet-atom#105).

However:

  • Why should installing git be a prerequisite (and a pain) for 1/3rd of atom packages and not the other 2/3rd?
  • I am using git through Github for Windows (https://windows.github.com/) and it seems there is no fixed path for git.exe in this case (only temporary ones).

You probably want to report this to the apm repo since it happens with lots of packages.

Aren't you curious to know why your package triggers this issue whereas most of others do not? :-)

You can check the source there's really nothing fancy. I wouldn't be surprised if having git on your path is a requirement for using apm actually.

It is probably more subtle, as most packages work well...

As advised, I have posted the issue here: atom/apm#227

I think I found your problem, I have emmisary as a dependency, and emmisary have a direct git repo dependency (https://github.com/atom/emissary/blob/master/package.json).

So It's actually npm that requires you to have git.exe on you path. Check if you have a C:\Program Files (x86)\Git\bin folder and add it to your path, install git for windows if you don't.

Sorry, I am not familiar with package systems. On which line is the dependency?

Also, as I said, I am using git through Github for Windows (https://windows.github.com/) and it seems there is no fixed path for git.exe in this case (only temporary ones).

Line 35: https://github.com/atom/emissary/blob/master/package.json#L35

You could perhaps ask the github for windows folks where they put git.exe and add that to your path if you don't want to install git.exe separatly.

Thank you.

As I said, Github stores git.exe in what looks like a temporary directory.

I prefer not to use hacks or workarounds. Fixing the tab behavior of a text editor is not such a big deal. I just want to signal the problem to the appropriate folks. Does emmisary dependency to git look legitimate? Should I inform them of the issue?

Installing git is not a workaround you should definitly install it properly
and add it to your path if you intend to use npm (which is required to
install atom packages).

The Emmisary dev will probably not take your remark into consideration,
trying to avoid git dependencies is a good practice but typically it's only
done as a last ressort (important bug fix in a fork, not yet merged in
official repo) so he probably didn't have a choice.

Wow, your last answer is frightening: nobody would guess it is about a text editor :-)
Anyway, thanks a lot.