【问题标题】:NativeScript Sidekick - CLI is required (version 5.1.1)NativeScript Sidekick - 需要 CLI(版本 5.1.1)
【发布时间】:2019-06-15 11:18:34
【问题描述】:

我最近在 mac OS 上的 Sidekick 应用程序中发现新版本的 CLI 已发布,我需要更新。

我退出 Sidekick 并在终端中运行“sudo tns i -g nativescript@latest --unsafe-perm”命令,结果如下:

+ nativescript@5.1.1
updated 67 packages in 14.325s

当我尝试启动 Sidekick 时,我收到以下错误: Sidekick prompt

我返回终端并运行“tns doctor”,结果如下:

✔ Getting environment information 

No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 10.1.0 satisfies minimum required version 9.
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 5.1.0 and the latest available version is 5.1.1.

tns doctorSidekick 似乎都无法识别更新,我应该如何解决这个问题?

【问题讨论】:

    标签: nativescript


    【解决方案1】:

    你有nvm吗?当终端中的设置与全局设置不同时,可能会发生这种情况。例如,可以在终端中使用一个节点版本,而在全局安装的 Sidekick 中使用另一个节点版本。

    【讨论】:

    • 我没有安装 nvm。
    【解决方案2】:

    您不应该使用sudo - 请参阅this blog post,详细了解如何通过在进行 NPM 安装时消除对超级用户的需求来解决问题。类似话题here

    【讨论】:

    • 当我再次在我的 Mac 前时,我必须检查一下。将返回结果
    【解决方案3】:

    在 tns doctor 命令中,我们收到了这条消息:Getting NativeScript components versions information... 这在尝试更新后:sudo npm install nativescript -g --unsafe-perm 之后我们收到了很多错误信息。 用这个简单的命令解决: tns proxy clear 然后运行:sudo npm install nativescript -g --unsafe-perm 解决了!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-22
      • 1970-01-01
      • 1970-01-01
      • 2021-05-11
      • 1970-01-01
      • 2019-09-27
      • 2019-11-29
      • 1970-01-01
      相关资源
      最近更新 更多