如何从Adal 4升级到Adal5?

时间:2018-03-14 10:51:59

标签: azure adal

您好我正在处理角度5.我正在使用adal 4身份验证。我正在尝试将它升级到adal 4到adal 5.

下面是我的package.json。

"dependencies": {
    "@angular/animations": "^5.1.0",
    "@angular/common": "5.1.0",
    "@angular/compiler": "5.1.0",
    "@angular/compiler-cli": "5.1.0",
    "@angular/core": "5.1.0",
    "@angular/forms": "5.1.0",
    "@angular/platform-browser": "5.1.0",
    "@angular/platform-browser-dynamic": "5.1.0",
    "@angular/platform-server": "5.1.0",
    "@angular/router": "5.1.0",
    "@ngtools/webpack": "1.9.3",
    "@ngx-translate/core": "9.0.1",
    "@swimlane/ngx-datatable": "11.1.5",
    "@types/jquery": "3.2.16",
    "@types/webpack-env": "1.13.3",
    "adal-angular4": "^1.1.10",
    "angular-material-autocomplete-list": "^1.1.0",
    "angular2-multiselect-checkbox-dropdown": "^1.5.0",
    "angular2-template-loader": "0.6.2",
    "aspnet-webpack": "2.0.1",
    "awesome-typescript-loader": "3.4.1",
    "bootstrap": "3.3.7",
    "bootstrap-datepicker": "1.7.1",
    "bootstrap-select": "1.12.4",
    "bootstrap-toggle": "2.2.2",
    "bootstrap-vertical-tabs": "1.2.2",
    "chart.js": "2.7.1",
    "core-js": "2.5.3",
    "css": "2.2.1",
    "css-loader": "0.28.7",
    "enhanced-resolve": "^3.3.0",
    "event-source-polyfill": "0.0.12",
    "expose-loader": "0.7.4",
    "extract-text-webpack-plugin": "3.0.2",
    "file-loader": "1.1.5",
    "font-awesome": "4.7.0",
    "html-loader": "0.5.1",
    "jquery": "3.2.1",
    "json-loader": "0.5.7",
    "materialize-css": "^0.100.2",
    "ng2-charts": "1.6.0",
    "ng2-dropdown": "0.0.21",
    "ng2-toasty": "4.0.3",
    "ngx-bootstrap": "2.0.0-beta.11",
    "ngx-toggle-switch": "^1.3.9",
    "node-sass": "4.7.2",
    "primeng": "^5.2.0-rc.1",
    "raw-loader": "0.5.1",
    "rxjs": "5.5.5",
    "sass-loader": "6.0.6",
    "style-loader": "0.19.0",
    "to-string-loader": "1.1.5",
    "typescript": "2.6.2",
    "url-loader": "0.6.2",
    "web-animations-js": "2.3.1",
    "webpack": "3.10.0",
    "webpack-hot-middleware": "2.21.0",
    "webpack-merge": "4.1.1",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@angular/cli": "^1.6.4",
    "@types/chai": "4.0.10",
    "@types/jasmine": "2.8.2",
    "chai": "4.1.2",
    "jasmine-core": "2.8.0",
    "karma": "1.7.1",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.1.1",
    "karma-jasmine-html-reporter": "0.2.2",
    "karma-webpack": "2.0.6"
  }

我尝试了以下方法,

从package.json中删除了“adal-angular4”:“^ 1.1.10”,我尝试安装npm install adal-angular5。这会导致错误1235错误请尝试以root / Administrator身份再次运行此命令。我只是以管理员身份运行。 有人可以帮我升级到adal 5吗?

1 个答案:

答案 0 :(得分:1)

抱歉,不知道为什么会收到错误。但是,adal-angular5是一个不同的NPM,您可以尝试将adal-angular4 NPM更新为2.0.0,现在支持Angular5:

  

更新为Angular 5,清理文件。这是一个突破版本!