Could not unpublish my package


#1

Hi,

publishing works well (no auth problems…) but I could not unpublish my package anymore.

apm unpublish open-within-system
Are you sure you want to unpublish open-within-system? (yes) yes
Unpublishing open-within-system ✗
Unpublishing failed: Unauthorized

Package contains two versions, should i remove them first? How?

Thanks for feedack.


#2

We’re looking into this problem for you!


#3

@ProbablyCorey hey, have you some news for this issue here? :smirk:


#4

Does it still fail for you? What version of APM are you using (apm -v). You could also try and to run apm login again.


#5

Yep still fail. Works for anybody else? Maybe its because i use Two-Factor Authentication?

➜  ~  apm --version
apm  0.36.0
npm  1.4.4
node 0.10.26

➜  ~  apm login
GitHub Username or Email> $mail
Password>
Two-Factor Authentication Code> 123456
Saving token to Keychain ✓

➜  ~  apm unpublish open-within-system -f
Unpublishing open-within-system ✗
Unpublishing failed: Unauthorized

#6

Same for me,

○ apm login
GitHub Username or Email> iam4x
Password>
Saving token to Keychain ✓

○ apm --version
apm  0.40.0
npm  1.4.4
node 0.10.26

○ apm unpublish linter-jscs
Are you sure you want to unpublish linter-jscs? (yes) yes
Unpublishing linter-jscs ✗
Unpublishing failed: Unauthorized

Edit: fyi I’ve just switched the repo owner to an organization https://github.com/AtomLinter/linter-jscs maybe this is causing the error.


#7

I just had a similar issue, but I managed to resolve it.

I had moved my repository from gepoch/surround to gepoch/vim-surround. Both unpublish and publish quit working properly.

I had to move the repository back to surround, unpublish the package, move the repository to vim-surround, and republish the package.

Things seem to work again.


Can't publish package
#8

Did you try manually changing the package.json?


#9

Sure did. It did not help. It seemed like the job really needed to reach out and poke the old repostory for some reason…


#10

A new error with version 0.120.0:

/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/unpublish.js:110
        version = name.substring(atIndex + 1);
                       ^
TypeError: Cannot call method 'substring' of undefined
    at Unpublish.module.exports.Unpublish.run (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/unpublish.js:110:24)
    at Object.module.exports.run (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/apm-cli.js:221:32)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/cli.js:6:7)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/cli.js:17:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)

#11

Ayyy - the actual problem is it doesn’t issue an error message if you don’t enter a package name. I assumed it worked like publish which is incorrect.