首页 > 解决方案 > MVC 5 问题中的 Angular 7 安装

问题描述

我有一个运行良好的 Angular4 和 MVC 5 项目。

我想升级,所以我在 Visual Studio 17 中使用了 package.json,在每个包版本上我都使用智能感知选择了它的最新版本。我为我生成了下面提到的配置文件。

我在这个文件上运行了恢复包,它为我提供了 node_modules 中的许多文件,但是它给出了一些警告,尤其是node_modules/systemjs/dist/system.src.js文件没有生成

包.json

{
  "version": "1.0.0",
  "name": "PMS",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "@angular/common": "7.2.5",
    "@angular/compiler": "7.2.5",
    "@angular/core": "7.2.5",
    "@angular/forms": "7.2.5",
    "@angular/http": "7.2.5",
    "@angular/platform-browser": "7.2.5",
    "@angular/platform-browser-dynamic": "7.2.5",
    "@angular/router": "7.2.5",
    "angular-compare-validator": "0.2.0",
    "angular-webstorage-service": "1.0.2",
    "angular4-multiselect-dropdown": "2.0.0",
    "core-js": "2.6.5",
    "ng4-charts": "1.6.0",
    "ngx-mydatepicker": "2.4.9",
    "ngx-ssrs-reportviewer": "1.0.2",
    "rxjs": "6.4.0",
    "systemjs": "^3.0.0",
    "systemjs-plugin-babel": "0.0.25",
    "underscore": "1.9.1",
    "zone.js": "0.8.29"
  },
  "devDependencies": {
    "@types/node": "11.9.4",
    "angular4-multiselect-dropdown": "2.0.0",
    "http-server": "0.11.1",
    "ng2-bs3-modal": "0.15.0",
    "typescript": "3.3.3"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

问题

  1. 未生成node_modules/systemjs/dist/system.src.js文件

警告

npm WARN @angular/animations@4.4.7 requires a peer of @angular/core@4.4.7 but none is installed. You must install peer dependencies yourself.
npm WARN @fortawesome/angular-fontawesome@0.1.0-10 requires a peer of @angular/common@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @fortawesome/angular-fontawesome@0.1.0-10 requires a peer of @angular/core@^5.0.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine@1.1.2 requires a peer of jasmine-core@* but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine@1.1.2 requires a peer of karma@* but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine-html-reporter@1.4.0 requires a peer of karma@>=0.9 but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine-html-reporter@1.4.0 requires a peer of jasmine-core@>=3.3 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-bs3-modal@0.15.0 requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-bs3-modal@0.15.0 requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN ng2-bs3-modal@0.15.0 requires a peer of bootstrap@~3.3.x but none is installed. You must install peer dependencies yourself.
npm WARN ng2-bs3-modal@0.15.0 requires a peer of jquery@1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN karma-jasmine-html-reporter@0.2.2 requires a peer of karma@>=0.9 but none is installed. You must install peer dependencies yourself.
npm WARN PMS@1.0.0 No description
npm WARN PMS@1.0.0 No repository field.
npm WARN The package angular4-multiselect-dropdown is included as both a dev and production dependency.

+ systemjs@3.0.0
updated 1 package and audited 301 packages in 25.239s
found 0 vulnerabilities

标签: angularangular-cliangular7

解决方案


推荐阅读