-Bash: cnpm: command not found
– bash: Yarn: command not found
– bash: XXXX: command not found
all yarn/cnpm above are common, provided that this error is reported after successful installation
error: eacces: permission denied, MKDIR please move on to this article ð https://www.cnblogs.com/niceyoo/p/11703560.html
Different from windows , we use sudo NPM install – G yarn to install yarn , but we report the following error information when printing the terminal version or using yarn directly:
-bash:yarn:commandnotfound
One of the reasons is that the environment variables similar to those in windows are not configured
Input at the terminal:
open-e~/.bash_profile
The above command mode will be directly edited in Notepad or VIM command in console
vim~/.bash_profile
If you use the method of VIM to modify, remember to execute : WQ to save and exit
Taking the Open instruction as an example, we execute the following instructions on the terminal:
1ãtouch ~/.bash_ profile
Can skip, touch means to create without. Bash_ Profile is a temporary environment variable of the system
2ãopen -e ~/.bash_ profile
Open command to open this file. If you are prompted that you have no permission, please add sudo before it. Example: sudo open – E ~ /. Bash_ profile
3. Find the installed yarn directory 2
Do you remember the directory where you installed yarn?If you forget to perform the installation again, as shown in the figure below (the picture is the non self coding on the Internet)
4_ In the profile file, enter export path = $path/usr/local/node_ global/bin
Note: please set /usr/local/node_ Global replace with the directory where your yarn exists
5ãsource ~/.bash_ profile
Source means to re execute or refresh
6ãyarn -v
official account was buddy Java, which I created a Java related public number. I can record my own learning path. Interested partners can pay attention to the official account of the public: Ha: niceyoo
Similar Posts:
- After installing node on MAC, enter node – V to prompt node command not found
- Mac ADB prompts command not found
- Solve the problem of ADB: command not found on MAC
- Super detail: command not found: the scratch solution (add the scratch environment variable to Zsh under MAC)
- How to install “CONDA command not found” in MAC Anaconda
- [Solved] JSCH cannot run JAVA bash:java:Command not found.
- Mac open terminal error – bash:: command not found
- [Solved] Mac install maven Error: zsh: command not found: MVN
- CentOS Error -bash:systemctl:command not found
- [Solved] NPM installation error: error: eacces: permission denied