Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 31, 2025

Summary

Fix TypeScript compilation error in i18n collection by bypassing Nx compilation pipeline and using Playwright's native TypeScript handling.

Problem

After the PNPM/Nx migration, the i18n workflow fails with:

SyntaxError: TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript

This occurs because:

  • Before: playwright test used Playwright's native TypeScript compilation
  • After: nx e2e --config=playwright.i18n.config.ts routes through Nx's compilation pipeline
  • Nx's pipeline doesn't properly handle declare fields in LiteGraph source files

Solution

Change the collect-i18n command from:

"collect-i18n": "nx e2e --config=playwright.i18n.config.ts"

To:

"collect-i18n": "npx playwright test --config=playwright.i18n.config.ts"

This bypasses Nx and uses Playwright's native TypeScript compilation, which handles declare fields correctly.

This is the third and hopefully final fix for the i18n workflow after PRs #5266 and #5270.

┆Issue is synchronized with this Notion page by Unito

Change collect-i18n command from 'nx e2e' to 'npx playwright test' to use
Playwright's native TypeScript compilation instead of Nx's pipeline.

Nx's compilation pipeline doesn't properly handle TypeScript 'declare' fields
in LiteGraph source files, causing babel transform errors. Playwright's native
compilation handles these correctly.

This addresses the TypeScript compilation error:
'declare fields must first be transformed by @babel/plugin-transform-typescript'

Fixes remaining issue after previous workflow fixes.
@christian-byrne christian-byrne requested a review from a team as a code owner August 31, 2025 03:14
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 31, 2025
@github-actions
Copy link

github-actions bot commented Aug 31, 2025

🎨 Storybook Build Status

Build failed!

⏰ Completed at: 08/31/2025, 03:14:48 AM UTC

🔗 Links


⚠️ Please check the workflow logs for error details.

@github-actions
Copy link

github-actions bot commented Aug 31, 2025

🎭 Playwright Test Results

All tests passed across all browsers!

⏰ Completed at: 08/31/2025, 03:37:55 AM UTC

📊 Test Reports by Browser


🎉 Your tests are passing across all browsers!

Copy link
Member

@snomiao snomiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also remove nx from build-storybook and then storybook builds also works!

@christian-byrne christian-byrne merged commit 571043f into main Aug 31, 2025
17 checks passed
@christian-byrne christian-byrne deleted the fix/i18n-bypass-nx-compilation branch August 31, 2025 04:03
snomiao pushed a commit that referenced this pull request Aug 31, 2025
)

Change collect-i18n command from 'nx e2e' to 'npx playwright test' to use
Playwright's native TypeScript compilation instead of Nx's pipeline.

Nx's compilation pipeline doesn't properly handle TypeScript 'declare' fields
in LiteGraph source files, causing babel transform errors. Playwright's native
compilation handles these correctly.

This addresses the TypeScript compilation error:
'declare fields must first be transformed by @babel/plugin-transform-typescript'

Fixes remaining issue after previous workflow fixes.
@benceruleanlu benceruleanlu mentioned this pull request Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CI/CD size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants