Apm install go-plus => Failed resolving git HEAD etc... CACHE problem?


#1

Hello, here is the output of apm install go-plus. I can’t install goplus :pensive:

apm install go-plus
Installing go-plus to /home/victor/.atom/packages ✗
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) fatal: ambiguous argument 'go-plus': unknown revision or path not in the working tree.
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) Use '--' to separate paths from revisions, like this:
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) 'git <command> [<revision>...] -- [<file>...]'
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) 
npm ERR! Linux 3.16.0-41-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/victor/.atom/.apm/.apmrc" "--userconfig" "/home/victor/.atom/.apmrc" "install" "/tmp/d-115521-11135-1r0meuf/package.tgz" "--target=0.22.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1
npm ERR! code 128

npm ERR! Command failed: fatal: ambiguous argument 'go-plus': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-115521-11135-r3o4yc/npm-debug.log

and here are my atom versions:

apm -v
apm  0.171.0
npm  2.5.1
node 0.10.35
python 2.7.6
git 2.4.3

thank you for your help!!!


#2

I just tried it and it worked for me. Have you followed the suggestions in the Debugging document? Also, could you give the following information?

  • Which version of Atom are you using? (You only included your apm versions)
  • What OS and version are you running?

#3

Hello and thanks leedohm for your help.

My OS is Ubuntu 14.04 64 bits, I installed atom using the .deb on the main page.

atom --version
0.210.0

And here are some results from the debugging procedure:

apm links
/home/victor/.atom/dev/packages (0)
└── (no links)
/home/victor/.atom/packages (0)
└── (no links)

Starting the editor with atom --safe and trying to install the package produce the same installation error:

atom --safe

and I didn’t install any other package. Also:

apm install --check
Checking for native build tools ✓

Finally, I should probably mention that if I clone the git repository in the package/ folder, modify the package.json (add a / at the end of this url https://github.com/joefitzgerald/atom-message-panel.git) and then run “apm install” it will install the package. But then the keybidings of the go-plus package doesn’t work (for example code: formatting the code on save, but from the pakage menu, it works).

Thanks!


#4

I don’t know what is causing this. You should probably open a bug on the apm repository. I suspect something is messed up in your configuration but I can’t see where.


#5

Ok, thanks. I already posted there for this problem, but had no answer, so that I solved using the / trick. But I’m actually not satisfied with this solution, as then the ctrl+s won’t automatically format the code (that’s what it is supposed to do).

And I’m looking at the error, when using apm install, there are many options flags, maybe should get inspired for manual package installation:

"/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/victor/.atom/.apm/.apmrc" "--userconfig" "/home/victor/.atom/.apmrc" "install" "/tmp/d-115521-11135-1r0meuf/package.tgz" "--target=0.22.0" "--arch=x64"

I tried cleaning the cache doing “/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js cache clean”, but the error persist.

I also posted on the package github issue page, but no answer after 9 days. :pensive:


#6

Like I say, I don’t know what the real issue is. I don’t know enough about the apm internals to give you a better clue. Everyone is pretty busy getting ready for CodeConf later this week, so that is possibly the reason that there is a bit of a slow response.


#7

Ok, I totally understand.

Today I upgraded to Atom 1.0 on ubuntu 14.04, and tried again to install go-plus 3.3.12, and still same error (it installed without problem on my mac):

Installing “go-plus@3.3.12” failed.Hide output…npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) fatal: ambiguous argument 'go-plus': unknown revision or path not in the working tree.
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) Use '--' to separate paths from revisions, like this:
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) 'git <command> [<revision>...] -- [<file>...]'
npm ERR! Failed resolving git HEAD (https://github.com/joefitzgerald/atom-message-panel.git) 
npm ERR! Linux 3.16.0-41-generic
npm ERR! argv "/usr/share/atom/resources/app/apm/bin/node" "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/victor/.atom/.apm/.apmrc" "--userconfig" "/home/victor/.atom/.apmrc" "install" "/tmp/d-115527-14657-pqu4ct/package.tgz" "--target=0.22.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.5.1
npm ERR! code 128

npm ERR! Command failed: fatal: ambiguous argument 'go-plus': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-115527-14657-qw3b92/npm-debug.log

If anyone with the same problem stumble onto this post… :stuck_out_tongue: thank you!


#8

I notice that you closed both bugs. I think you have the best chance of getting the information you need by reopening one of them (probably the one on atom/apm) and waiting for a response. I’ve done my best to bring a lot of attention to the board to help handle the increase in traffic, so we’ve probably exhausted the brain trust that frequents the board.


#9

thanks for your advice, I reopened both of them…

On atom/apm => https://github.com/atom/apm/issues/375
On go-plus github => https://github.com/joefitzgerald/go-plus/issues/225


#10

I solved the problem by moving npm-cli.js, doing this:

sudo mv /usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js /usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js.bak

Then install the package from atom and it worked! (I don’t know how it can work without knowing about npm-cli.js but it worked!

So it should have been a npm cache problem.

Happy now! thank you leedhom for your help, and thank you the team for ATOM which is great.


#11

Here is the correct and proper solution to clean apm cache, and solve the error:

 "/usr/share/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/home/victor/.atom/.apm/.apmrc" cache clear

after that, re-open ATOM and go to update or install the package that gave you problem!