Ошибка: не найдено соответствующей версии для @ angular / localize @ ~ 8.2.14 при установке 'ng add @ ng-bootstrap / ng- bootstrap' в приложении Angular - PullRequest
0 голосов
/ 03 августа 2020

Я устанавливаю ng add @ng-bootstrap/ng-bootstrap в свой проект, чтобы использовать popups в Angular приложении.

При установке с терминала кода Visual Studio возникает ошибка

D:\path\ProcProject>ng add @ng-bootstrap/ng-bootstrap
Skipping installation: Package already installed
UPDATE package.json (1720 bytes)
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @angular/localize@~8.2.14.
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 'ProcProject'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\username\AppData\Roaming\npm-cache\_logs\2020-08-03T11_19_41_731Z-debug.log
Package install failed, see above.

D:\path\ProcProject>
D:\path\ProcProject>
D:\path\ProcProject>

Это моя angular конфигурация

D:\path\ProcProject>ng --version

     _                      _                 ____ _     ___ 
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.3.29
Node: 12.18.1
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.23
@angular-devkit/build-angular     0.803.23
@angular-devkit/build-optimizer   0.803.23
@angular-devkit/build-webpack     0.803.23
@angular-devkit/core              8.3.23
@angular-devkit/schematics        8.3.29
@angular/cli                      8.3.29
@angular/google-maps              10.1.0
@angular/localize                 <error>
@ngtools/webpack                  8.3.23
@schematics/angular               8.3.29
@schematics/update                0.803.29
rxjs                              6.4.0
typescript                        3.5.3
webpack                           4.39.2

Как я могу исправить эту проблему?

1 Ответ

0 голосов
/ 03 августа 2020

Эта проблема устранена путем запуска ng add @angular/localize, а затем ng add @ng-bootstrap/ng-bootstrap

...