【 umi ant-design-pro 】Project startup prompt sh: umi: command not found # mac system

Question: # mac system

umi ant-design-pro project start project npm start prompt

sh: umi: command not found


Solution:

 1. Install globally  umiand make sure the version is 2.0.0 or above

$ yarn global add umi
$ umi -v
@4.0.36

2. Get the global  bin path

$ yarn global bin
/usr/local/bin

3. Run the open command to open the .bash_profile file

$ open ~/.bash_profile

If there is no .bash_profile file

implement:

$ sudo vi ~/.bash_profile 

# 在 .bash_profile中添加下面一行
export PATH="$PATH:`yarn global bin`"

#例如: export PATH="$PATH:/usr/local/bin"

4. Run the following command to make the modification effective

source ~/.bash_profile

5. Run umi -v again

$ umi -v
[email protected]

 When the local project npm strat is started again, the above error will not be prompted

Guess you like

Origin blog.csdn.net/q1ngqingsky/article/details/128297238