【问题标题】:npm install "No compatible version found" for everythingnpm install "No compatible version found" for all
【发布时间】:2018-03-29 04:45:15
【问题描述】:

执行以下命令时:

npm install @angular/animations@'^5.2.0' @angular/common@'^5.2.0' @angular/compiler@'^5.2.0' @angular/compiler-cli@'^5.2.0' @angular/core@'^5.2.0' @angular/forms@'^5.2.0' @angular/http@'^5.2.0' @angular/platform-browser@'^5.2.0' @angular/platform-browser-dynamic@'^5.2.0' @angular/platform-server@'^5.2.0' @angular/router@'^5.2.0' typescript@2.4.2 rxjs@'^5.5.2'

我收到消息说找不到 rxjs 的兼容版本。然后,当我删除特定版本时,它说找不到角度/动画的兼容版本。然后是角度/普通。等等等等。

我很确定这些版本是有效的,因为它们是这个 Angular 升级工具 (https://angular-update-guide.firebaseapp.com/) 推荐的版本,而且我还可以看到“有效安装目标”列表,其中包括我正在使用的版本正在尝试安装。

我知道我们项目的依赖项位于某个特殊的存储库中(我认为是 Artifactory?),所以这可能是因为这些版本不在​​ NPM 正在查看的 repo 中。

在承诺必须在 repo 中安装新版本之前,有没有办法解决这个问题以进行测试?换句话说,我如何将 NPM 指向 NPM repo 而不是公司的 repo?

【问题讨论】:

    标签: npm


    【解决方案1】:

    嗯,我正在寻找的答案在这里:

    How to specify registry while doing npm install with git remote url?

    但实际上并没有奏效。

    问题只是语法问题。在我从命令中删除所有引号后,它看起来像以下命令,它起作用了

    npm install @angular/animations@^5.2.0 @angular/common@^5.2.0 @angular/compiler@^5.2.0 @angular/compiler-cli@^5.2.0 @angular/core@^5.2.0 @angular/forms@^5.2.0 @angular/http@^5.2.0 @angular/platform-browser@^5.2.0 @angular/platform-browser-dynamic@^5.2.0 @angular/platform-server@^5.2.0 @angular/router@^5.2.0 typescript@2.4.2 rxjs@^5.5.2
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-26
      • 1970-01-01
      • 1970-01-01
      • 2020-03-16
      • 1970-01-01
      • 2021-10-21
      • 2012-08-13
      相关资源
      最近更新 更多