zsh: command not found: denon - Even after installing denon
Asked Answered
M

3

5

I install denon on my mac and then tried to run this cmd: denon --init

I get this message zsh: command not found: denon

Even when I try to check for the version using denon --version, it throws the same message.

Mosely answered 28/5, 2020 at 5:43 Comment(0)
M
16

After some googling and trial and error I found the solution to the above problem.

Looks like denon got installed at a different path. So we need to provide the correct path.

Run the below cmd in terminal. You get this path after your denon installation is complete.

export PATH="/Users/<your account>/.deno/bin:$PATH"

Now try running your denon cmds.

Mosely answered 28/5, 2020 at 5:43 Comment(0)
M
3

After installation, just run "export" commands shown in terminal:

Deno was installed successfully to /Users/John/.deno/bin/deno

Manually add the directory to your $HOME/.zshrc (or similar)

export DENO_INSTALL="/Users/John/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
Maidenhead answered 27/7, 2020 at 20:24 Comment(0)
G
3

Firstly, the reason why denon is a command not found is that the deno bin pathname is not declared in the system PATH.

You can see that yourself by running the command:

echo $PATH

You have to add the deno binary path to your system PATH.

The instructions are available to you when you install denon, e.g. here's the output after denon install:

✅ Successfully installed denon
/Users/<YOUR-USERNAME>/.deno/bin/denon
ℹ️  Add /Users/<YOUR-USERNAME>/.deno/bin to PATH
    export PATH="/Users/<YOUR-USERNAME>/.deno/bin:$PATH"

Edit your shell profile file, e.g. .profile, .bashrc, .zshrc, etc and include the deno bin path.

If you don't know which shell you have for the matter, run:

echo $SHELL

For my case, that'll be /bin/zsh and I have a .zshrc file, where I add or edit as follows:

export PATH="$HOME/.deno/bin:$PATH"

To complete, you have to restart the terminal emulator or source the shell profile file, e.g. for my case I'd:

source ~/.zshrc

Confirm everything is working by:

denon --version

You'd get

[*] [main] vX.X.X

That's all!

Gelderland answered 28/3, 2023 at 13:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.