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

Support npm:tsx (esbuild) #20625

Open
birkskyum opened this issue Sep 21, 2023 · 4 comments
Open

Support npm:tsx (esbuild) #20625

birkskyum opened this issue Sep 21, 2023 · 4 comments
Labels
bug Something isn't working correctly node API Related to various "node:*" modules APIs node compat

Comments

@birkskyum
Copy link
Contributor

birkskyum commented Sep 21, 2023

tsx - GitHub

This compiler is used many places in peoples package.json scripts, so it would be great if deno is able to execute it, until it's replaced with i.e. deno everywhere.

Platform

Darwin 22.6.0 arm64 arm

Version

deno 1.37.0

Repro

// index.ts
console.log("Print this");
  • deno run npm:tsx index.ts

It actually breaks even without a file provided, so just deno run npm:tsx;

Expected

> Print this

Actual

➜ deno run npm:tsx index.  
error: Uncaught TypeError: ws.WriteStream.prototype.hasColors is not a function
    at file:///Users/admin/repos/compile-with-tsx/node_modules/.deno/tsx@3.12.10/node_modules/tsx/dist/cli.js:18:332
@bartlomieju bartlomieju added bug Something isn't working correctly node compat labels Sep 22, 2023
@bartlomieju bartlomieju added the node API Related to various "node:*" modules APIs label Mar 4, 2024
@littledivy
Copy link
Member

@marvinhagemeister
Copy link
Contributor

The missing hasColors method error is resolved in main and it fails now with this error:

error: unexpected argument '--require' found

  tip: a similar argument exists: '--quiet'

Usage: deno run --allow-all --quiet [SCRIPT_ARG]...

For more information, try '--help'.

@birkskyum
Copy link
Contributor Author

deno 2.0.0-rc.2+aaf2bf4

> deno run -A npm:tsx index.ts

error: unexpected argument '--require' found

  tip: to pass '--require' as a value, use '-- --require'

Usage: deno run [OPTIONS] [SCRIPT_ARG]...

@birkskyum
Copy link
Contributor Author

@marvinhagemeister , is this likely to be upsteam issue with the flag similar to the tauri issue here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly node API Related to various "node:*" modules APIs node compat
Projects
None yet
Development

No branches or pull requests

4 participants