Expo CLI需要安装后再安装(macOs)

  • 本文关键字:安装 macOs Expo CLI macos npm expo
  • 更新时间 :
  • 英文 :


我试图在我的终端上运行-npm start,但我得到通知This command requires Expo CLI,其中包含全局安装选项。如果我这样做,即使刚刚安装了Expo CLI,我也会立即得到相同的消息和相同的选项来安装它。有什么办法可以解决这个问题吗?

我的终端现在是这样的:

user@user-MacBook-Pro Project %  npm start              
> start
> expo start
This command requires Expo CLI.
Do you want to install it globally [Y/n]? y
Installing the package 'expo-cli'...
Expo CLI installed. You can run `expo --help` for instructions.
This command requires Expo CLI.
Do you want to install it globally [Y/n]? y
Installing the package 'expo-cli'...
Expo CLI installed. You can run `expo --help` for instructions.
This command requires Expo CLI.
Do you want to install it globally [Y/n]? y
Installing the package 'expo-cli'...
Expo CLI installed. You can run `expo --help` for instructions.
This command requires Expo CLI.
Do you want to install it globally [Y/n]? 

我将感激任何建议,提前谢谢你!

请尝试先通过npm start安装Expo CLI,然后再运行npm start

如果问题仍然存在,尝试直接运行expo start而不是npm start,看看它会产生什么。

最新更新