You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I tried to build the packages within the Eslint Rewrite. When using Node.js, npm run build functioned correctly on both Windows and macOS. However, when I used the command bun run --bun build on Windows, it performed as expected, whereas on macOS, I encountered the following error:
Building packages in this order: packages/object-schema, packages/config-array, packages/compat, packages/core, packages/migrate-config
Building packages/object-schema...
> @eslint/[email protected] build
> rollup -c && tsc -p tsconfig.esm.json && npm run build:cts
npm ERR! Lifecycle script `build` failed with error:
npm ERR! TypeError: p.stdin.end is not a function. (In 'p.stdin.end()', 'p.stdin.end' is Infinity)
npm ERR! in workspace: @eslint/[email protected]
npm ERR! at location: /Users/amareshsm/Desktop/Repositories/rewrite/packages/object-schema
104 | function buildPackages(packageDirs) {
105 | console.log(`Building packages in this order: ${packageDirs.join(", ")}`);
106 |
107 | for (const packageDir of packageDirs) {
108 | console.log(`Building ${packageDir}...`);
109 | execSync(`npm run build -w ${packageDir} --if-present`, {
^
error: null
errno: -1
code: "1"
syscall: "spawnSync"
path: "/bin/sh"
at new SystemError (node:child_process:902:14)
at node:child_process:175:24
at node:child_process:226:23
at buildPackages (/Users/amareshsm/Desktop/Repositories/rewrite/scripts/build.js:109:3)
at /Users/amareshsm/Desktop/Repositories/rewrite/scripts/build.js:125:1
Bun v1.1.20 (macOS arm64)
error: script "build" exited with code 1
➜ rewrite git:(bun-test)
src/index.js → dist/cjs/index.cjs, dist/esm/index.js...
created dist/cjs/index.cjs, dist/esm/index.js in 44ms
> @eslint/[email protected] build:cts
> node -e "fs.copyFileSync('dist/esm/index.d.ts', 'dist/cjs/index.d.cts')"
npm ERR! Lifecycle script `build:cts` failed with error:
npm ERR! TypeError: p.stdin.end is not a function. (In 'p.stdin.end()', 'p.stdin.end' is Infinity)
npm ERR! in workspace: @eslint/[email protected]
npm ERR! at location: /Users/amareshsm/Desktop/Repositories/rewrite/packages/object-schema
I also tried to use spawnSync instead of execSync, but encountered the same error.
Jarred-Sumner
changed the title
Bun Build failed - TypeError: p.stdin.end is not a function. (In 'p.stdin.end()', 'p.stdin.end' is Infinity)
@eslint/object-schema throws p.stdin.end is not a function on macOS
Jul 16, 2024
Jarred-Sumner
changed the title
@eslint/object-schema throws p.stdin.end is not a function on macOS@eslint/object-schema throws p.stdin.end is not a function on macOS
Jul 16, 2024
What version of Bun is running?
1.1.20+ae1948925
What platform is your computer?
Darwin 21.5.0 arm64 arm
What steps can reproduce the bug?
Description:
I tried to build the packages within the Eslint Rewrite. When using Node.js,
npm run build
functioned correctly on both Windows and macOS. However, when I used the commandbun run --bun build
on Windows, it performed as expected, whereas on macOS, I encountered the following error:Steps:
npm install
bun run --bun build
What is the expected behavior?
The packages should be built successfully without any errors.
What do you see instead?
Instead I got the below error:
Additional information
It is failing in CI as well - eslint/rewrite#87
When I used the
bun run --bun build
command to build each package individually, it worked as expected.The text was updated successfully, but these errors were encountered: