"exp:找不到命令";如何将expo cli添加到path? [英] "exp: command not found" How do I add expo cli to path?

查看:174
本文介绍了"exp:找不到命令";如何将expo cli添加到path?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了expo cli

I installed the expo cli with

npm i -g exp

然后我跑步

exp

我得到

-bash: exp: command not found

我猜我没有将exp添加到路径中.那么我该如何正确执行呢?到目前为止,我还没有尝试过.

I'm guessing I didn't add exp to path. So how do I do this properly? Nothing I've tried so far works.

推荐答案

此建议的3个步骤解决方案对我有效:

This suggested 3 steps solution worked for me:

  1. 首先检查~/.npm-global/bin是否在您的路径中:echo $PATH.如果不存在,则需要将其添加到路径中.

  1. First check if ~/.npm-global/bin is in your path: echo $PATH. If it isn’t there, you will need to add it to the path.

打开~/.bash_profile,然后在底部添加以下行:export PATH=$PATH:~/.npm-global/bin

Open up ~/.bash_profile then add the following line to the bottom: export PATH=$PATH:~/.npm-global/bin

最后,在外壳中,键入:source ~/.bash_profile

Finally, back in the shell, type: source ~/.bash_profile

希望这可以解决您的问题.

Hopefully that will have fixed your problem.

这篇关于"exp:找不到命令";如何将expo cli添加到path?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆