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

CLI crashes if no arg[0] #10217

Open
khallmark opened this issue Nov 13, 2024 · 0 comments
Open

CLI crashes if no arg[0] #10217

khallmark opened this issue Nov 13, 2024 · 0 comments

Comments

@khallmark
Copy link

Reproduction

run npx remix or npx exec remix on a fresh install with no arguments. Pretty clear that it's trying to call startsWith on an undefined object. No reproduction steps needed.

TypeError: Cannot read properties of undefined (reading 'startsWith')
    at Object.run (/Users/khallmark/Desktop/Code/taskifier/node_modules/@remix-run/dev/dist/cli/run.js:171:17)
    at Object.<anonymous> (/Users/khallmark/Desktop/Code/taskifier/node_modules/@remix-run/dev/dist/cli.js:16:11)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Object..js (node:internal/modules/cjs/loader:1689:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function._load (node:internal/modules/cjs/loader:1128:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49

System Info

System:
    OS: macOS 15.2
    CPU: (12) arm64 Apple M2 Max
    Memory: 7.75 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
    Watchman: 2024.11.11.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 131.0.6778.69
    Safari: 18.2
  npmPackages:
    @remix-run/css-bundle: ^2.14.0 => 2.14.0 
    @remix-run/dev: ^2.14.0 => 2.14.0 
    @remix-run/express: ^2.14.0 => 2.14.0 
    @remix-run/node: ^2.14.0 => 2.14.0 
    @remix-run/react: ^2.14.0 => 2.14.0 
    @remix-run/serve: ^2.14.0 => 2.14.0 
    vite: ^5.4.11 => 5.4.11

Used Package Manager

npm

Expected Behavior

No crash when argv[0] is not sent. Shows help.

Actual Behavior

Crashes when no argv[0] sent

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

No branches or pull requests

1 participant