-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected end of JSON input #600
Comments
There's not enough info here to help you. |
We'll need your terminal output and your system settings at least to take a look at this, @suyogn |
Closing this for lack of information, @suyogn feel free to open this again if you feel like you need more help. |
@suyogn I ran into this same issue today. It was caused by me trying to publish a pre-release version of a package that did not yet exist in the registry. Publishing to a non-pre release version fixed this for me. |
Ah that's interesting @hgascoigne . We should not throw an error like unexpected JSON in that case, but actually throw an error saying there are no tags to parse from the npm registry. I think this is a simple fix. A good PR would be welcome for the same. |
So, I played around with reproducing this bug and was not able to. When i tried to publish a pre-release of an unpublished package on npm, Also, the function we use to parse the npm tags has methods to handle errors, and returns @hgascoigne , any more pointers on how to reproduce this would be helpful. |
Sure, happy to provide some more details. Reproduction:
Error
Solution |
I'm trying to publish a pre-release of an unpublished package and I get the What information can I provide to help solve this problem? |
@sebacruz , Currently, we are blocked by this issue in npm. Only possible solution would be to create a initial release before doing pre-releases. The only other way is to rollback your npm version to ~ |
Same issue here |
add .npmignore file on your package.json level
It made it work! |
Switching to a newer version of node helped (from 14.15.4 to 16.18.0). |
getting an error as Unexpected end of JSON input
The text was updated successfully, but these errors were encountered: