W
Wasp•8mo ago
Ninja++

Path error

WARNING: It looks like '/Users/milesscott/.local/bin' is not on your PATH! You will not be able to invoke wasp from the terminal by its name.
You can add it to your PATH by adding following line into your profile file (~/.profile or ~/.zshrc or ~/.bash_profile or ~/.bashrc or some other, depending on your configuration):
export PATH=$PATH:/Users/milesscott/.local/bin
WARNING: It looks like '/Users/milesscott/.local/bin' is not on your PATH! You will not be able to invoke wasp from the terminal by its name.
You can add it to your PATH by adding following line into your profile file (~/.profile or ~/.zshrc or ~/.bash_profile or ~/.bashrc or some other, depending on your configuration):
export PATH=$PATH:/Users/milesscott/.local/bin
I have tried to edit this path file but i really don't understand what i am doing. Here is my attempt to edit the file below.
/usr/bin/env bash
export PATH=$PATH:/Users/milesscott/.local/bin
waspc_datadir=/Users/milesscott/.local/share/wasp-lang/0.13.2/data
/Users/milesscott/.local/share/wasp-lang/0.13.2/wasp-bin "$@"
/usr/bin/env bash
export PATH=$PATH:/Users/milesscott/.local/bin
waspc_datadir=/Users/milesscott/.local/share/wasp-lang/0.13.2/data
/Users/milesscott/.local/share/wasp-lang/0.13.2/wasp-bin "$@"
An explanation of what i am not understanding would be really appreciated
21 Replies
kapa.ai
kapa.ai•8mo ago
Hi @Miles. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- It seems like you're trying to add the Wasp binary to your system's PATH. The PATH is an environment variable on Unix-like operating systems, and it specifies a set of directories where executable programs are located. In your case, the Wasp binary is located in the .local/bin directory in your home directory, but this directory is not included in your system's PATH. That's why you're seeing the warning message. Here's a step-by-step guide on how to add the .local/bin directory to your PATH: 1. Open your shell configuration file. This could be one of the following files, depending on your shell: - For Bash shell: ~/.bashrc or ~/.bash_profile - For Zsh shell: ~/.zshrc 2. Add the following line at the end of the file:
export PATH="$HOME/.local/bin:$PATH"

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

This line adds the .local/bin directory located in your home directory to the beginning of the PATH variable. 3. Save the changes and close the file. 4. Reload the shell configuration by running the following command in your terminal: - For Bash shell: source ~/.bashrc or source ~/.bash_profile - For Zsh shell: source ~/.zshrc After following these steps, the .local/bin directory should be added to your PATH, and you should be able to run the wasp command from your terminal without encountering the "not on your PATH" error. Regarding the file you're trying to edit, it seems like it's a shell script that's meant to be executed. The export line is correct, but the other lines are meant to be run as commands, not placed in a configuration file. The waspc_datadir line sets an environment variable, and the last line runs the Wasp binary with any arguments passed to the script. If you're still having trouble, I recommend reaching out to the Wasp community on their Discord server (https://discord.gg/rzdnErX) for more help. Source: Discord support thread: Installation trouble > Answers (https://discord.com/channels/686873244791210014/1214888257595121684) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Miles, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Filip
Filip•8mo ago
Hi @Miles, I think the bot is spot on! I'll just put special emphasis on step 4 - realoding the shell Let us know if you got it working
Ninja++
Ninja++OP•8mo ago
Hi sorry but it is not working when i do what it says on step 4 i get this source: no such file or directory: /Users/milesscott/.zshrc milesscott@Miless-MacBook-Air ~ %
Filip
Filip•8mo ago
Step 4 depends on which shell you're using. If you're using Bash, then you should only do the first bullet But since you're on a mac, I'm guessing you're using zsh (you can check by doing echo $SHELL)
Ninja++
Ninja++OP•8mo ago
im using zsh
Filip
Filip•8mo ago
In that case, you'll have to create the /Users/milesscott/.zshrc file You said you tried to edit the file? Which file was it? Anyway, put this in your .zshrc and you should be good to go:
export PATH=$PATH:/Users/milesscott/.local/bin
export PATH=$PATH:/Users/milesscott/.local/bin
Ninja++
Ninja++OP•8mo ago
The local. bin file
MEE6
MEE6•8mo ago
Wohooo @Miles, you just became a Waspeteer level 1!
Ninja++
Ninja++OP•8mo ago
Ok so this is just a txt file with that in it?
Filip
Filip•8mo ago
Yes
Ninja++
Ninja++OP•8mo ago
Sorry i have never had to use this Path stuff before
Filip
Filip•8mo ago
It's actually a shell script file, but that's essentially text 🙂 No worries, we've all been there at one point!
Ninja++
Ninja++OP•8mo ago
Sorry i am confused as to how i should make this file Because i do not understand what is going on underneath i feel very lost @sodic So i am making a txt file called? and saving it as .zshrc in the /Users/milesscott/ folder?
Filip
Filip•8mo ago
Yes, that's right 🙂 Btw, since is general stuff, not at all Wasp-related. PATHs, shell startup files, and evironment variables are necessary knowledge for any developer. So, if you're still confused, I recommend reading up on it. Here are some of the resources: - https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-linux - https://kinsta.com/knowledgebase/what-is-an-environment-variable/ Keywords: environment variables, shell startup files, PATH, zshrc
Ninja++
Ninja++OP•8mo ago
I have created the file and edited it with the path but i still cant do the wasp command
No description
Ninja++
Ninja++OP•8mo ago
I also did the reload shell config
Filip
Filip•8mo ago
Hey @Miles, unfortunately I don't have any more time to work on with this issue (especially it not being wasp-related). I suggest thoroughly reading the previous messages (especially this one) 🙂 Good luck! Hey @Miles, did you get it working?
Ninja++
Ninja++OP•8mo ago
No unfortunately not It's still not letting me run any wasp command I read through again and the articles you linked and tbh I'm more confused than before Could it not amend the path file during the install script? I feel I've fallen at the first hurdle
Filip
Filip•8mo ago
Did you create a ~/.zshrc file with this content?
Ninja++
Ninja++OP•8mo ago
Yes I created the file I can see it when I Ls And I added the path But it still doesn't work
Filip
Filip•8mo ago
can you screenshot the output of cat ~/.zshrc?
Want results from more Discord servers?
Add your server