gpt4 book ai didi

linux - 尝试全局安装 expo ubuntu 时出现“找不到命令”

转载 作者:行者123 更新时间:2023-12-04 18:59:03 27 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Yarn global command not working

(12 个回答)


5个月前关闭。




当我安装 expo 时,它会安装但不会安装。以下是有关该问题的详细信息。
我首先输入:

yarn global add expo-cli@4
安装时它说:
warning package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "expo-cli > xdl > @expo/dev-server > @expo/metro-config > metro-react-native-babel-transformer@0.59.0" has unmet peer dependency "@babel/core@*".
[4/4] Building fresh packages...
当我使用 yarn 安装博览会时,我得到:
Installed "expo-cli@4.12.0" with binaries:
- expo
- expo-cli
Done in 4.30s.
但是当我输入 'expo --version'我得到:
Command 'expo' not found, did you mean:

command 'exo' from snap exoscale-cli (v1.22.2)
command 'expn' from deb sendmail-base (8.15.2-18)
command 'expr' from deb coreutils (8.30-3ubuntu2)

See 'snap info <snapname>' for additional versions.

最佳答案

根据您发布的内容,我假设 yarn 安装全局节点模块的文件夹不在您的路径中。
尝试其中之一:

  • 尝试使用 npm 全局安装(可能在您的路径中)
  • npm i -g expo-cli
  • 将 yarn 全局文件夹添加到路径:
  • echo PATH="$PATH:$(yarn global bin)" >> ~/.bash_profile有关更多信息,请参阅此线程: Yarn global command not working

    关于linux - 尝试全局安装 expo ubuntu 时出现“找不到命令”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69399325/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com