我安装了世博-Cli
Rachels@Rachels MacBook-Air~% sudo npm安装expo -g
我认为它是成功的,因为它以
中的1包
全面的答复是:
rachelchng@Rachels-MacBook-Air ~ % sudo npm install expo-cli -g
Password:
npm WARN deprecated joi@14.0.4: This version has been deprecated in accordance with the hapi
support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated joi@11.4.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).npm警告被废弃的topo@2.0.2:根据hapi支持策略(hapi.im/ support ),这个版本已被废弃。请升级到最新版本,以获得最好的功能,错误修复,和安全补丁。如果您此时无法升级,则可以为旧版本(hapi.im/ versions )提供付费支持。npm警告废弃hoek@4.2.1:根据hapi支持策略(hapi.im/ support ),已不再推荐此版本。请升级到最新版本,以获得最好的功能,错误修复,和安全补丁。如果您此时无法升级,则可以为旧版本(hapi.im/ versions )提供付费支持。npm警告废弃的topo@3.0.3:这个模块已经移动,现在可以在@hapi/topo上使用。请更新您的依赖项,因为此版本不再维护,可能包含错误和安全问题。npm警告废弃hoek@6.1.3:这个模块已经移动,现在可以在@hapi/hoek上使用。请更新您的依赖项,因为此版本不再维护,可能包含错误和安全问题。/usr/local/c业力/node/13.6.0/bin/ -> -> /usr/local/->/node/13.6.0/bin/expo-> npm警告@expo/->@0.2.11需要一个尖-cli@^1.10.0的对等点,但没有安装。您必须自己安装对等依赖项。npm警告可选跳过可选依赖关系:@expo/ngrok-bin-freebsd-os 32@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-freebsd-ia32):npm警告不要跳过可选依赖项:不支持平台for @expo/ngrok freebsd-ia32@2.2.8:希望{"os":"freebsd","arch":"ia32"} (当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选的跳过可选依赖项:@expo/ngrok达尔文-ia32@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-darwin-ia32):npm警告不跳过可选依赖:不支持@expo/ngrok-bin-bin-os 32@2.2.8的平台:被通缉的{“os”:“ia32”}(当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/ngrok linux-arm@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-linux-arm):npm警告不跳过可选依赖:不支持平台for @expo/ngrok linux-arm@2.2.8:希望{"os":"linux","arch":"arm"} (当前:{“os”:“达尔文”,“x64”}) npm警告可选跳过可选依赖关系:@expo/ngrok freebsd-x64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-freebsd-x64):npm警告不要跳过可选依赖:不支持平台for @expo/ngrok freebsd-x64@2.2.8:通缉{"os":"freebsd",“x64”}(当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/ngrok linux-arm64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-linux-arm64):npm警告不要跳过可选依赖:不支持平台for @expo/ngrok linux-arm64@2.2.8:通缉{"os":"linux",“arm64”}(当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/ngrok linux-os 32@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-linux-ia32):npm警告不跳过可选依赖:不支持平台for @expo/ngrok linux-os 32@2.2.8:通缉{"os":"linux“:”ia32“}(当前:{”os“:”达尔文“,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/ngrok sunos-x64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-sunos-x64):npm警告不跳过可选依赖:不支持平台for @expo/ngrok-bin-sunos-x64@2.2.8:通缉{"os":"sunos",“x64”}}(当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/ngrok linux-x64@2.2.8 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-linux-x64):npm警告不要跳过可选依赖:不支持@expo/ngrok linux-linux-x64@2.2.8的平台:x64}(当前:{“os”:“x64”}“x64”}) npm警告可选跳过可选依赖关系:@expo/ngrok-bin-bin-bin 32-ia32@2.2.8-beta.1 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-win32-ia32):npm警告不要跳过可选依赖项:不支持@expo/ngrok-bin-bin 32-ia32@2.2.8-beta.1: for:“win32”,"arch":"ia32"} (当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/ngrok bin 32-x64@2.2.8-beta.1 (node_modules/expo-cli/node_modules/@expo/ngrok-bin-win32-x64):npm警告不要跳过可选依赖项:不支持的平台for @expo/ngrok bin 32-x64@2.2.8-beta.1:通缉{"os":"win32","arch":"x64"} (当前:{“os”:“达尔文”,"arch":"x64"}) npm警告可选跳过可选依赖项:@expo/@1.11.3 (node_modules/expo-cli/node_modules/@expo/traveling-fastlane-linux):npm警告不要跳过可选依赖:不支持@expo/x64-fastlane@1.11.3:win32 {"os":"win32“,"arch":"any"} (当前:{os:”达尔文“,"arch":"x64"})
+ expo-cli@3.11.5
updated 1 package in 35.064s然而,当我尝试创建一个新的世博会项目时,它会返回“未找到的命令:世博”。我尝试过多次重新下载博览,但还是没有用。拜托救救我!
rachelchng@Rachels-MacBook-Air ~ % cd Desktop
rachelchng@Rachels-MacBook-Air Desktop % cd rn
rachelchng@Rachels-MacBook-Air rn % cd 01
rachelchng@Rachels-MacBook-Air 01 % expo init first
zsh: command not found: expo
rachelchng@Rachels-MacBook-Air 01 % 发布于 2020-04-12 03:05:04
我也遇到了同样的问题,对我来说,博览并不包括在我的$PATH变量中。
运行echo $PATH。如果世博会没有出现在那里,请遵循以下步骤:
打开~/.bash_profile并添加
export PATH=$PATH:~/.npm-global/bin在文件的末尾。保存它并最终执行source ~/.bash_profile。那就应该管用了。
https://stackoverflow.com/questions/59660827
复制相似问题