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

chore(init-templates): replace ts-node with tsx #30338

Closed
wants to merge 3 commits into from

Conversation

pavinthan
Copy link

@pavinthan pavinthan commented May 25, 2024

Reason for this change

It's solved the error require() of ES Module issue by just replacing it.

Description of changes

www.npmjs.com/package/tsx

tsx Powered by esbuild for fast TypeScript compilation and use by AWS amplify

Description of how you validated changes

Tested in local machine

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

tsx is powered by esbuild for fast TypeScript compilation
Compiler powered by esbuild for fast TypeScript compilation
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels May 25, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team May 25, 2024 13:26
@pavinthan pavinthan changed the title chore(init-templates): Replace ts-node with tsx chore(init-templates): replace ts-node with tsx May 25, 2024
@mergify mergify bot mentioned this pull request May 25, 2024
1 task
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 25, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 0a97e69
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@TheRealAmazonKendra
Copy link
Contributor

Can you clarify the circumstances under which you are getting error require() of ES Module?

@TheRealAmazonKendra
Copy link
Contributor

Unfortunately we cannot accept this change. tsx skips type checking

@casyalex
Copy link

just add tsc --noEmit can solve type checking issue.
since ts-node is bad for support esm module, tsx is a better choice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants