jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
8.2k stars 192 forks source link

Getting "Error: accepts at most 0 arg(s), received 1" on every install package attempt #1975

Closed vr8hub closed 4 months ago

vr8hub commented 4 months ago

What happened?

New M3 MBP running Sonoma 14.4.1. I ran the curl script to install devbox, got

Downloading and Installing
✓ Downloading devbox binary... [DONE]
→ Installing in /usr/local/bin/devbox (requires sudo)...
✓ Installing in /usr/local/bin/devbox... [DONE]
✓ Successfully installed devbox 🚀

Next Steps
  1. Learn how to use devbox
     Run devbox help or read the docs at https://github.com/jetpack-io/devbox
  2. Get help and give feedback
     Join our community at https://discord.gg/jetpack-io

I then tried to do a global install of git, e.g. devbox global install git, and received this:

>devbox global install git
✓ Downloading version 0.10.4... [DONE]
✓ Verifying checksum... [DONE]
✓ Unpacking binary... [DONE]

Error: accepts at most 0 arg(s), received 1

I get the same thing on any package install.

Although the devbox install page says it will install nix if it's not installed, it does not appear to have done so; I have no /nix mountpoint directory on my machine, and which nix shows nothing.

I followed the "uninstall devbox" steps, rebooted, and tried again, same results.

  1. What does the above error message mean ("accepts at most 0 arg(s), received 1")?
  2. What would cause devbox not to install nix? Does it do so at initial install or at first package attempt? I would really prefer not to have to install nix manually; is there something I can do to get it to install it?
  3. Where do I go from here?

Steps to reproduce

  1. Install devbox.
  2. Try to global install a package.
  3. Get above error.

Command

global, install

devbox.json

N/A, see above and debug log.

Devbox version

0.10.4

Nix version

N/A, see above

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

There's no devbox.json because nothing has been installed yet, and nothing has been installed yet due to the above error. (I haven't run init because I use it globally, not for projects.)

2024/04/08 21:12:50 findProjectDir: path is 2024/04/08 21:12:50 finding devbox config in dir: /Users/XXXX (redacted) 2024/04/08 21:12:50 finding devbox config in dir: /Users 2024/04/08 21:12:50 failed to open devbox: No devbox.json found in this directory, or any parent directories. Did you run devbox init yet? 2024/04/08 21:12:50 findProjectDir: path is 2024/04/08 21:12:50 finding devbox config in dir: /Users/XXXX 2024/04/08 21:12:50 finding devbox config in dir: /Users 2024/04/08 21:12:50 failed to open devbox: No devbox.json found in this directory, or any parent directories. Did you run devbox init yet? Error: accepts at most 0 arg(s), received 1

2024/04/08 21:12:50 ExecutionID:c95b53d83033434781f690de95dc8981

2024/04/08 21:12:50 findProjectDir: path is 2024/04/08 21:12:50 finding devbox config in dir: /Users/XXXX 2024/04/08 21:12:50 finding devbox config in dir: /Users
Lagoja commented 4 months ago

I think the command you need is devbox global add git.

devbox install takes no arguments, and is used to install packages that are in your devbox.json but have not been installed on your machine.

vr8hub commented 4 months ago

Sigh. This is what I get from muscle memory of a previous packaging manager. This was a profoundly stupid thing I did here. :(

Thank you very much, @Lagoja, for what should have been an unnecessary pointer, but instead saved me from insanity. I will now go repent in sackcloth and ashes.