创建 NativeScript Helloworld 项目失败

Create NativeScript Helloworld project failed

我正在尝试创建 NativeScript“HelloWorld”项目。 > ns create hello-world --ng 抛出以下错误:

请求https://registry.npmjs.org/@nativescript/template-hello-world-ng/-/template-hello-world-ng-8.0.5.tgz失败,原因:无法验证第一个证书

while ns doctor shows all good.

> ns 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.
        ✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
        ✔ Getting NativeScript components versions information...    
        ✔ Component nativescript has 8.0.1 version and is up to date.

我没有使用任何代理,使用的是 Win 10 操作系统和 VS Code 编辑器。

让我自己回答这个问题。经过几天的努力,我可以通过简单地重新安装 Nativescript 来解决这个问题。

希望这对某人有所帮助。