Open ajb-oce opened 1 year ago
Still present in 1.1.17 on amd64 ArchLinux (non-package installation via install.sh)
Unexpected error. Please report it as a bug:
7 | function spawn(command, args, options) {
8 | // Parse the arguments
9 | const parsed = parse(command, args, options);
10 |
11 | // Spawn the child process
12 | const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
^
TypeError: Executable not found in $PATH: "npm"
code: "ERR_INVALID_ARG_TYPE"
at spawn (node:child_process:721:8)
at node:child_process:2:21
at spawn (/tmp/bunx-1000-create-react-app@latest/node_modules/cross-spawn/index.js:12:24)
at /tmp/bunx-1000-create-react-app@latest/node_modules/create-react-app/createReactApp.js:383:19
at new Promise (:1:11)
at install (/tmp/bunx-1000-create-react-app@latest/node_modules/create-react-app/createReactApp.js:334:10)
at /tmp/bunx-1000-create-react-app@latest/node_modules/create-react-app/createReactApp.js:461:16
What version of Bun is running?
1.0.3+25e69c71e70ac8a0a88f9cf15b4057bd7b2a633a
What platform is your computer?
Darwin 21.6.0 arm64 arm
What steps can reproduce the bug?
Without node installed:
install bun using curl command
install react using
bun install react
try to create a new react app using
bun create react-app <dirname>
Fails
Install Node using
brew install node
re-attempt create new react app using
bun create react-app <dirname>
success
What is the expected behavior?
Should create a new react-app
Success! Created bun-react-app at /Users/users/Documents/Projects/bun-react-app
What do you see instead?
user@macbook Projects % bun create react-app bun-react-app
Creating a new React app in /Users/user/Documents/Projects/bun-react-app.
Installing packages. This might take a couple of minutes. Installing react, react-dom, and react-scripts...
Aborting installation. Unexpected error. Please report it as a bug: 605 | } 606 | get stdio() { 607 | return this.#stdioObject ??= this.#createStdioObject(); 608 | } 609 | 610 | spawn(options) { ^ TypeError: Executable not found in $PATH: "npm" code: "ERR_INVALID_ARG_TYPE"
Deleting generated file... package.json Deleting bun-react-app/ from /Users/user/Documents/Projects Done.
Additional information
No response