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

Bunx not work as expected in execSync from node:child_process (but bun x works fine) #11008

Open
kravetsone opened this issue May 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kravetsone
Copy link

What version of Bun is running?

1.1.8+89d25807f

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

import { execSync } from "node:child_process";

execSync("bunx @teidesu/slow-types-compiler fix --entry jsr.json");
PS Z:\PROJECTS\node-ts\GRAMIO\keyboards> bun jsr       
$ bun scripts/release-jsr.ts
error: Script not found "@teidesu/slow-types-compiler"
 9 |
10 | jsrConfig.version = version;
11 |
12 | fs.writeFileSync("jsr.json", JSON.stringify(jsrConfig, null, 2));
13 |
14 | execSync("bunx @teidesu/slow-types-compiler fix --entry jsr.json");
     ^
error: error: Script not found "@teidesu/slow-types-compiler"

   errno: -1
   code: "1"
 syscall: "spawnSync"
   path: "C:\Windows\system32\cmd.exe"

      at new SystemError (node:child_process:887:27)
      at node:child_process:172:47
      at node:child_process:223:45
      at Z:\PROJECTS\node-ts\GRAMIO\keyboards\scripts\release-jsr.ts:14:1

Bun v1.1.8 (Windows x64)
error: script "jsr" exited with code 1

But when i wrote bun x instead of bunx all works fine (thank you, RiskyMH)

import { execSync } from "node:child_process";

execSync("bun x @teidesu/slow-types-compiler fix --entry jsr.json"); // works fine

What is the expected behavior?

bunx and bun x have no difference

What do you see instead?

No response

Additional information

No response

@kravetsone kravetsone added the bug Something isn't working label May 11, 2024
@kravetsone kravetsone reopened this May 12, 2024
kravetsone added a commit to gramiojs/create-gramio that referenced this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant