Я пытаюсь добавить маршрутизатор в проект, который при создании не сказал да маршрутизатору. Вот команда, которую я выполняю:
npm install -g @angular/router
А вот конфигурация проекта и результат команды:
Angular CLI: 9.1.1
Node: 10.15.1
OS: win32 x64
Angular: 9.1.2
... common, compiler, compiler-cli, core
Ivy Workspace: Yes
Package Version
-------------------------------------------------------------
@angular-devkit/architect 0.901.1
@angular-devkit/build-angular 0.901.1
@angular-devkit/build-ng-packagr 0.901.1
@angular-devkit/build-optimizer 0.901.1
@angular-devkit/build-webpack 0.901.1
@angular-devkit/core 9.1.1
@angular-devkit/schematics 9.1.1
@angular/animations 9.0.7
@angular/cdk 9.2.1
@angular/cli 9.1.1
@angular/flex-layout 9.0.0-beta.29
@angular/forms 9.0.7
@angular/language-service 9.0.7
@angular/material 9.2.1
@angular/platform-browser 9.0.7
@angular/platform-browser-dynamic 9.0.7
@angular/router 9.0.7
@ngtools/webpack 9.1.1
@schematics/angular 9.1.1
@schematics/update 0.901.1
ng-packagr 9.1.1
rxjs 6.5.5
typescript 3.7.5
webpack 4.42.0
PS D:\PrismNewUI\PrismWebUIUX> npm install -g @angular/router
npm WARN @angular/router@9.1.3 requires a peer of @angular/core@9.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@9.1.3 requires a peer of @angular/common@9.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@9.1.3 requires a peer of @angular/platform-browser@9.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@9.1.3 requires a peer of rxjs@^6.5.3 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@9.1.3 requires a peer of tslib@^1.10.0 but none is installed. You must install peer dependencies yourself.
+ @angular/router@9.1.3
updated 1 package in 0.482s
Мне кажется, текущая версия маршрутизатора выше, чем мой проект .
Как я понимаю, роутер не устанавливается. Что мне делать в этом случае?
Спасибо
Без глобального флага:
PS D:\PrismNewUI\PrismWebUIUX> npm install @angular/router
npm WARN @angular-devkit/build-ng-packagr@0.901.1 requires a peer of tsickle@~0.37.1 || ~0.38.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/animations@9.0.7 requires a peer of @angular/core@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@9.0.7 requires a peer of @angular/core@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@9.0.7 requires a peer of @angular/common@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser@9.0.7 requires a peer of @angular/core@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser@9.0.7 requires a peer of @angular/common@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser-dynamic@9.0.7 requires a peer of @angular/core@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser-dynamic@9.0.7 requires a peer of @angular/common@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/platform-browser-dynamic@9.0.7 requires a peer of @angular/compiler@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @rollup/plugin-json@4.0.2 requires a peer of rollup@^1.20.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.2 requires a peer of node-sass@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.2 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-subresource-integrity@1.4.0 requires a peer of html-webpack-plugin@^2.21.0 || ~3 || >=4.0.0-alpha.2 <5 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@9.0.7 requires a peer of @angular/core@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/router@9.0.7 requires a peer of @angular/common@9.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ @angular/router@9.0.7
updated 1 package and audited 17382 packages in 11.929s
found 2 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details