Apm publish minor doesn´t work


#1

I’m really trying to publish a package to atom but I can not …
Does anyone know why or went through this same problem?


#2

IMHO, you should just use apm publish --tag x.y.z. I tried to use the minor major stuff when I started and I just got massively confused. I’m sure apm worked correctly. The problem was between my chair and my keyboard.


#3

Well, it’s saying that the package must be in a Git repository before you can publish. Can you run a git status in the directory where the package you want to publish is contained?


#4

The instructions tell you that you need to have a git repository published on Github!
So the workflow is this:

  1. Have your package in a Github repo.
  2. Clone the repo to your laptop and do your thing.
  3. Commit and Push back up to Github.
  4. Then run apm publish minor.

As @mark_hahn says, you can give it an exact version, too. But if it’s the first time you publish, and your package.json shows a version of 0.0.0, it’ll do this automatically for you.


#5

Thank you all for answers. Surely the problem is in my lack of knowledge itself. In fact I already have a repository in GIT (https://github.com/thiagolucio/toolbar-iconshortcuts) but nevertheless reading the published instructions understood that it should have a repository within the Atom (https://atom.io/users/thiagolucio/) and not the github (https://atom.io/packages/toolbar-iconshortcuts)
As the instructions say to publish the package generated from within the atom itself I understood that to get up direct package folder (~ / github / my-package /) located on my computer.
This is the confusion in my head. I will try to make operations using the “apm help publish” test and send the package directly from my github repository.

.
If someone can give me more precise information about it in time thanks but I end up finding out.


#6

Please follow the steps we described above.

Publishing a package via apm will require your local code to have your github repo as a remote. So if your package on your local laptop has no link to your github repo, apm does not know where to find it.

apm needs to find your package on Github, so it can update it with a tag, before publishing that package on atom.io.


#7

thank´s a lot batjko…I’ll keep trying to say here and return the result …


#8

This is the scr for my repository…


#9

Ah, look at your package.json file. It has the wrong repository:

This needs to be your own repository, not in atom:
https://github.com/thiagolucio/toolbar-iconshortcuts

This is why apm refuses it, you don’t have permission to push to a repository in github.com/atom (apart from the fact that it doesn’t exist there, of course).


#10

it works! thanks a \o/ !!! :clap:
Just a small detail that makes all the difference…beginner’s mistakes.
You be a hero today.
Thanks again!


#11

No problem. Well done with your package! :thumbsup: