Skip to content

SyntaxError: Unexpected end of JSON input when trying to publish packagesΒ #397

@v1rtl

Description

@v1rtl

Affected Packages

All of the packages

Problem

When I try to publish my packages using pnpx changesets publish I get this error:

➜ pnpx changeset publish
πŸ¦‹  info npm info @tinyhttp/app
πŸ¦‹  info npm info @tinyhttp/cors
πŸ¦‹  info npm info @tinyhttp/etag
πŸ¦‹  info npm info @tinyhttp/logger
πŸ¦‹  info npm info @tinyhttp/static
πŸ¦‹  info @tinyhttp/app is being published because our local version (0.1.21) has not been published on npm
πŸ¦‹  info @tinyhttp/cors is being published because our local version (0.1.20) has not been published on npm
πŸ¦‹  info @tinyhttp/etag is being published because our local version (0.1.20) has not been published on npm
πŸ¦‹  info @tinyhttp/logger is being published because our local version (0.1.20) has not been published on npm
πŸ¦‹  info @tinyhttp/static is being published because our local version (0.1.20) has not been published on npm
πŸ¦‹  info Publishing "@tinyhttp/app" at "0.1.21"
πŸ¦‹  info Publishing "@tinyhttp/cors" at "0.1.20"
πŸ¦‹  info Publishing "@tinyhttp/etag" at "0.1.20"
πŸ¦‹  info Publishing "@tinyhttp/logger" at "0.1.20"
πŸ¦‹  info Publishing "@tinyhttp/static" at "0.1.20"
πŸ¦‹  error SyntaxError: Unexpected end of JSON input
πŸ¦‹  error     at JSON.parse (<anonymous>)
πŸ¦‹  error     at internalPublish (/home/v1rtl/Coding/tinyhttp/node_modules/.pnpm/@changesets/cli@2.9.1_@types+node@14.0.13/node_modules/@changesets/cli/dist/cli.cjs.dev.js:591:19)
πŸ¦‹  error     at processTicksAndRejections (internal/process/task_queues.js:97:5)

Same happens with ./node_modules/.bin/changeset publish

I don't know what causes it because there's no clear error message.

Helpful info

reproduction repository: https://github.com/talentlessguy/tinyhttp
changesets config: https://github.com/talentlessguy/tinyhttp/blob/master/.changeset/config.json
node version: 14.4.0
pnpm version: 5.0.2
npm version: 6.14.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions