Skip to content
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

nx release publish fails when package exists but no latest tag is pushed yet #30610

Open
1 of 4 tasks
thdk opened this issue Apr 4, 2025 · 0 comments
Open
1 of 4 tasks

Comments

@thdk
Copy link
Contributor

thdk commented Apr 4, 2025

Current Behavior

> nx run @thdk/lib-c:nx-release-publish
  
  Something unexpected went wrong when checking for existing dist-tags.
   SyntaxError: Unexpected end of JSON input
      at JSON.parse (<anonymous>)
      at runExecutor (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/@nx/js/src/executors/release-publish/release-publish.impl.js:[119](https://github.com/thdk/nx-monorepo-demo/actions/runs/14263132694/job/39978988948#step:8:121):37)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async promiseToIterator (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/command-line/run/run.js:36:11)
      at async getLastValueFromAsyncIterableIterator (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/utils/async-iterator.js:15:19)
      at async iteratorToProcessStatusCode (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/command-line/run/run.js:39:25)
      at async handleErrors (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/utils/handle-errors.js:8:24)
      at async process.<anonymous> (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/bin/run-executor.js:59:28)


 NX   Running target nx-release-publish for project @thdk/lib-c failed

When I manually run the command to fetch dist tags for my npm package I get indeed nothing returned. Which is not valid json.

# exits without returning anything
npm view @thdk/lib-c versions dist-tags --json --"@thdk:registry=https://npm.pkg.github.com"

See releated npm issues:

Expected Behavior

Either a proper error message or continue as if the package doesn't exist or doesn't have any dist tags?

GitHub Repo

No response

Steps to Reproduce

  • publish a new package with dist-tag next
  • ensure no latest tag exists for the package
  • publish a the same package again

Nx Report

NX   Report complete - copy this into the issue template

Node           : 22.2.0
OS             : darwin-arm64
Native Target  : aarch64-macos
npm            : 10.8.0

nx                     : 20.7.1
@nx/js                 : 20.7.1
@nx/jest               : 20.7.1
@nx/eslint             : 20.7.1
@nx/workspace          : 20.7.1
@nx/devkit             : 20.7.1
@nx/esbuild            : 20.7.1
@nx/eslint-plugin      : 20.7.1
@nx/module-federation  : 20.7.1
@nx/node               : 20.7.1
@nx/react              : 20.7.1
@nx/vite               : 20.7.1
@nx/web                : 20.7.1
typescript             : 5.7.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/eslint/plugin
@nx/jest/plugin
@nx/react/router-plugin
@nx/vite/plugin
---------------------------------------
Cache Usage: 209.37 KB / 46.04 GB

Failure Logs

> nx run @thdk/lib-c:nx-release-publish
  
  Something unexpected went wrong when checking for existing dist-tags.
   SyntaxError: Unexpected end of JSON input
      at JSON.parse (<anonymous>)
      at runExecutor (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/@nx/js/src/executors/release-publish/release-publish.impl.js:[119](https://github.com/thdk/nx-monorepo-demo/actions/runs/14263132694/job/39978988948#step:8:121):37)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async promiseToIterator (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/command-line/run/run.js:36:11)
      at async getLastValueFromAsyncIterableIterator (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/utils/async-iterator.js:15:19)
      at async iteratorToProcessStatusCode (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/command-line/run/run.js:39:25)
      at async handleErrors (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/src/utils/handle-errors.js:8:24)
      at async process.<anonymous> (/home/runner/work/nx-monorepo-demo/nx-monorepo-demo/node_modules/nx/bin/run-executor.js:59:28)


 NX   Running target nx-release-publish for project @thdk/lib-c failed

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@thdk thdk added the type: bug label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant