在我的ubuntu机器上,我正在尝试使用yarn global add exp
全局安装expo。它似乎起作用,因为它最终说:
success Installed "exp@54.0.1" with binaries:
- exp
Done in 1.66s.
然后我进入/home/.yarn/bin/
并存在exp!我可以./exp --version
并打印54.0.1
但是,当我尝试exp --version
时,它会说:
Command 'exp' not found, but can be installed with:
sudo apt install alliance
如果我尝试yarn exp --version
(这是错误的,对吧?我应该只需要做exp --version
我认为)。它说:
yarn run v1.7.0
error Couldn't find a package.json file in "/home/felix/.yarn/bin"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.