Skip to content

feat(js): improve SWC compilation error logging#33297

Merged
Coly010 merged 1 commit intonrwl:masterfrom
YevheniiYusenkov:patch-1
Dec 12, 2025
Merged

feat(js): improve SWC compilation error logging#33297
Coly010 merged 1 commit intonrwl:masterfrom
YevheniiYusenkov:patch-1

Conversation

@YevheniiYusenkov
Copy link
Copy Markdown
Contributor

Currently, when SWC compilation fails, Nx logs only a generic message:

"SWC compilation failed"

There is no error.message, no stderr and no stdout printed.
In many cases the actual cause of failure is completely hidden, which makes debugging very difficult, especially in CI.

This PR improves the logging by printing:

  • error.message (or the error itself)
  • stderr if available
  • stdout if available

This makes SWC failures visible and debuggable again.

Current Behavior

Only a generic "SWC compilation failed" message is logged. No error message or stdout are shown.

Expected Behavior

Include error.message, stderr, and stdout (when available) so developers can understand and debug failures.

@YevheniiYusenkov YevheniiYusenkov requested a review from a team as a code owner October 29, 2025 16:49
@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 29, 2025

👷 Deploy request for nx-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit e5e852f

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Dec 12, 2025 2:08pm

Adds clearer diagnostics when SWC compilation fails:
- logs Error.message
- prints stderr and stdout outputs

Improves debugging for local development and CI.
@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Dec 12, 2025

View your CI Pipeline Execution ↗ for commit e5e852f

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 8m 42s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 26s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-12 16:22:09 UTC

@Coly010 Coly010 merged commit 54eed65 into nrwl:master Dec 12, 2025
17 of 19 checks passed
FrozenPandaz pushed a commit that referenced this pull request Dec 15, 2025
Currently, when SWC compilation fails, Nx logs only a generic message:

  "SWC compilation failed"

There is no `error.message`, no `stderr` and no `stdout` printed.
In many cases the actual cause of failure is completely hidden, which
makes debugging very difficult, especially in CI.

This PR improves the logging by printing:

- error.message (or the error itself)
- stderr if available
- stdout if available

This makes SWC failures visible and debuggable again.

## Current Behavior
Only a generic "SWC compilation failed" message is logged. No error
message or stdout are shown.

## Expected Behavior
Include error.message, stderr, and stdout (when available) so developers
can understand and debug failures.

(cherry picked from commit 54eed65)
FrozenPandaz pushed a commit that referenced this pull request Dec 15, 2025
Currently, when SWC compilation fails, Nx logs only a generic message:

  "SWC compilation failed"

There is no `error.message`, no `stderr` and no `stdout` printed.  
In many cases the actual cause of failure is completely hidden, which
makes debugging very difficult, especially in CI.

This PR improves the logging by printing:

- error.message (or the error itself)
- stderr if available
- stdout if available

This makes SWC failures visible and debuggable again.



## Current Behavior
Only a generic "SWC compilation failed" message is logged. No error
message or stdout are shown.

## Expected Behavior
Include error.message, stderr, and stdout (when available) so developers
can understand and debug failures.
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants