【问题标题】:No matching version found for protractor@~5.4.0没有找到 protractor@~5.4.0 的匹配版本
【发布时间】:2018-09-02 03:02:52
【问题描述】:

我尝试按照 Angular cli 教程创建 Angular 应用程序。但是,它在量角器 5.4.0 上引发错误。

这是错误信息:

npm ERR! code ETARGET
npm ERR! notarget No matching version found for protractor@~5.4.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'angulartest6'
npm ERR! notarget

量角器的最新版本是5.4.0。我也尝试手动安装,但它抛出了这个错误: npm 错误! notarget 没有找到 protractor@5.4.0 的匹配版本

有什么解决方法使我不会收到此错误?

【问题讨论】:

    标签: protractor angular-cli


    【解决方案1】:

    您能否尝试将以下内容添加到您的package.jsonfile:

      "dependencies": {
        "protractor": "5.4.0"
      }
    

    【讨论】:

    • 它是一个开发依赖项,当您使用 Angular cli 命令创建应用程序时会自动包含在内。这适用于我的 Windows 7 笔记本电脑,但不适用于我的 Windows 10。我想知道这是否是问题所在。
    猜你喜欢
    • 2022-01-02
    • 2021-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-10
    • 2021-10-27
    • 2021-11-06
    • 2022-08-23
    相关资源
    最近更新 更多