Apm: Cannot publish new package from windows

Created on 6 Apr 2018  Â·  5Comments  Â·  Source: atom/apm

Prerequisites

Description

I created a new package yesterday, https://github.com/calebmeyer/vim-mode-plus-macros

I went to publish it using apm publish minor, and ran into several issues across the two windows machines I own.

Steps to Reproduce

  1. Create a package using the package generator. Delete all the view related bits, just keep the console.log
  2. Update the package.json to have your name and the correct repository
  3. Open up powershell, then run apm publish minor to publish version 0.1.0

Expected behavior: The package publishes successfully

Actual behavior:
Work laptop: npm throws an error trying to rename the temporary package.json
https://gist.github.com/calebmeyer/bda5031f00e164612af0763b94b7bf32

Home Desktop: git throws an error about not being authenticated, and doesn't let you provide credentials (though it does on push)
https://gist.github.com/calebmeyer/6d77848739d35c706168c1ef890d3c99

Reproduces how often: The first time, until a successful publish

Versions

versions
windows version

Additional Information

My gitconfig only contains my name and email. I installed git with the credential manager on windows.

Most helpful comment

@calebmeyer If you at some point manage to reproduce the problem, please let us know. If we figure out how to reproduce the problems you encounted, we might be able to fix it properly or at least document how to "prime the pump" :bowing_man:

All 5 comments

I followed @lee-dohm's recommendation to do an apm publish --tag v0.1.0. That worked.

I later made some changes and tried apm publish patch... It worked. So I'm super confused now.

The npm problem seems to be the same as this: https://github.com/npm/npm/issues/12059. Sadly, that issue has been automatically closed, yet seems unresolved. Scanning through the comments, the problem seems to be caused by the file IO subsystem in Windows, and triggered by anti-virus software, text editors, Windows Search indexing service, etc.

We should investigate whether it's possible to work around the problem in npm by catching these errors, and re-issuing the npm command.

Looking at the error message for the Git credential issue, it looks like you're hitting this issue: https://github.com/git-for-windows/git/issues/327. In the comments near the end there are mentions of a new interactive credential manager. @calebmeyer Can you check whether you're using the new bits? I don't really know whether there are still new and old credential managers on Windows, or whether it's just the new one.

I am using the credential manager. I'll see about updating my desktop to avoid the issue. In the mean time, I can publish from my laptop just fine now. Guess I just needed to prime the pump.

I'll close the issue for now, since it's resolved for me, and we have a workaround for others (use the --tag flag after doing the other steps manually)

@calebmeyer If you at some point manage to reproduce the problem, please let us know. If we figure out how to reproduce the problems you encounted, we might be able to fix it properly or at least document how to "prime the pump" :bowing_man:

Thanks @calebmeyer for helping us dig into this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonknittel picture simonknittel  Â·  7Comments

StevenACoffman picture StevenACoffman  Â·  7Comments

boustanihani picture boustanihani  Â·  7Comments

probonopd picture probonopd  Â·  7Comments

michaelsanford picture michaelsanford  Â·  4Comments