Problem publishing package


#1

Hi,

A package that published successfully a few days ago is now reporting an error when I attempt to update it. The error is “Creating new version failed: package.json invalid”. Anyone experienced this? The package.json contains perfectly valid json according to jsonlint.com and the only thing that has changed in that file is the version as altered by apm.

Thanks,
Neil


#2

Could you post the package.json or the link to the repository?


#3

Pretty sure this is the repo and package in question:

His package.json does indeed look valid. Only odd thing I can spot, is that Git user info was screwed up on three past commits. Maybe the “package.json invalid” error is a red herring? <grasping at=“straws” />


#4

Yes that is the right repo. I tried publish from windows and ubuntu, both gave me the same error. Are there any logs from apm?


#5

This looks really weird. Because the user of this repository is with-regard. According to this page, the only member of with-regard is davidblurton, not @eneiand. Perhaps that is what is blocking things? Did davidblurton publish the successful version, v0.1.1?


#6

No, I pushed the first two successful versions. It seems to the with-regard org was private so I’ve made that public now. I thought it might be line endings? Not sure how to figure that one out though.


#7

@ProbablyCorey Does someone have some ideas on what might be going wrong here? Or some extra logging?


#8

I think the problem is that the package name on atom.io is regard but the name in the package.json is Regard. I’ve opened up an issue for this on the atom.io repo.


#9

Thanks for the bug report! It’s clear that we should have a better error message than ‘invalid package.json’ here.

Names are case insensitive and displayed downcased, so that name change won’t make much of a difference on the site, however… there was a bug where one of the comparisons made when creating a new version was case sensitive by mistake. I just fixed that now, so you should now be able to publish versions with a package.json that has ‘Regard’ ‘regard’ or ‘rEgArD’.


#10

Thanks so much @ProbablyCorey and @thedaniel for the quick response and resolution!


#11

Yes thank you guys. The package has been updated now.