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

fix running esbuild cli with deno #3917

Closed
wants to merge 1 commit into from
Closed

Conversation

Joshix-1
Copy link

The problem:

$ deno --version
deno 1.46.3 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.5-rusty
typescript 5.5.2
$ deno run -A https://deno.land/x/esbuild@v0.23.1/mod.js > /dev/null
error: Uncaught (in promise) TypeError: stdin is not piped
  const writer = child.stdin.getWriter();
                       ^
    at ChildProcess.get stdin (ext:runtime/40_process.js:243:13)
    at spawnNew (https://deno.land/x/esbuild@v0.23.1/mod.js:1712:24)
    at https://deno.land/x/esbuild@v0.23.1/mod.js:1872:3
    at eventLoopTick (ext:core/01_core.js:169:7)

Relevant deno docs: https://docs.deno.com/api/deno/~/Deno.Command
This means getWriter/getReader can only be called if stdin/stdout are piped.

@evanw
Copy link
Owner

evanw commented Sep 21, 2024

Thanks for the report. It looks like Deno broke this API in Deno version 1.31.0 as far as I can tell. This code was working fine with Deno version 1.30.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants