Nx
Enterprise
Nx
Overview
Sign in / Sign up
Open main menu
Nx
GitHub
Select a tab
Overview
Runs
Analytics
Nx
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Filter
Filter exact branch match
Exact
Select status
Succeeded
master
cdf5edb4 fix(js): fix npm dist-tag error handling TypeError in release-publish executor (#32289) ### Summary Fixes a TypeError in the Nx release-publish executor that occurs when `npm dist-tag add` fails, preventing users from seeing the actual npm error message. ### Problem When `npm dist-tag add` fails during `nx release publish`, users see a JavaScript TypeError instead of the actual npm error: ``` npm dist-tag add error: Something unexpected went wrong when processing the npm dist-tag add output TypeError: Cannot read properties of undefined (reading 'summary') at runExecutor (/node_modules/@nx/js/src/executors/release-publish/release-publish.impl.js:207:50) ``` ### Root Cause The error handler attempts to access `stdoutData.error.summary` without checking if `error` exists. Since npm dist-tag outputs errors to stderr (not stdout), the parsed stdout is typically an empty object `{}`, causing `stdoutData.error` to be `undefined`. Accessing `.summary` on `undefined` throws a TypeError. ### Solution Added optional chaining (`?.`) when accessing error properties to prevent TypeErrors: ```javascript // Before (throws TypeError): if (stdoutData.error.summary) { ... } // After (safe): if (stdoutData.error?.summary) { ... } ``` ### Example **Before this fix:** ```bash $ nx release publish npm dist-tag add error: Something unexpected went wrong when processing the npm dist-tag add output TypeError: Cannot read properties of undefined (reading 'summary') ``` **After this fix:** ```bash $ nx release publish npm dist-tag add error: # (The actual npm error from stderr is shown, or if no JSON error, the code continues gracefully) ``` --------- Co-authored-by: Colum Ferry <cferry09@gmail.com>
7 days ago
by yordan-kan...
Failed
32289
9e35b996 Merge branch 'nrwl:master' into master
7 days ago
by yordan-kan...
Failed
32289
9e35b996 Merge branch 'nrwl:master' into master
8 days ago
by yordan-kan...
Previous Page
Prev
Next
Next Page