在https://update.angular.io/之后更新角度从5.2到6.0.3
但如果我尝试提供应用程序,我会遇到此错误。
ng update
表示已全部更新。
有谁知道解决它? 或者为什么会发生
错误 ../node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11): 错误TS2451:无法重新声明块范围的变量&ng-ngDevMode'。 node_modules/@angular/core/src/render3/ng_dev_mode.d.ts(9,11):错误 TS2451:无法重新声明块范围的变量&ng-ngDevMode'。
这是我的 package.json
{
"name": "xxx",
"version": "1.0.4",
"license": "",
"repository": {
"type": "git",
"url": ""
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"dev": "lite-server",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@agm/core": "1.0.0-beta.2",
"@angular/animations": "^6.0.3",
"@angular/cdk": "^6.1.0",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "^6.1.0",
"@angular/material-moment-adapter": "^6.1.0",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/platform-server": "^6.0.3",
"@angular/router": "^6.0.3",
"@auth0/angular-jwt": "^2.0.0",
"@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^2.0.0",
"animate.css": "3.5.2",
"arrive": "2.4.1",
"bootstrap": "4.0.0",
"bootstrap-material-design": "4.1.1",
"bootstrap-notify": "3.1.3",
"bootstrap-rtl": "3.3.4",
"bootstrap-tagsinput": "0.7.1",
"chart.js": "^2.7.2",
"core-js": "2.5.1",
"font-awesome": "^4.7.0",
"googleapis": "22.2.0",
"hammerjs": "^2.0.8",
"intl-tel-input": "^12.1.15",
"jasny-bootstrap": "^3.1.3",
"jquery": "3.2.1",
"moment": "^2.22.1",
"moment-timezone": "0.5.13",
"ng2-ckeditor": "^1.2.0",
"ng2-trim-directive": "^2.1.4",
"ngx-chips": "^1.9.2",
"ngx-infinite-scroll": "^0.6.1",
"perfect-scrollbar": "1.1.0",
"popper.js": "^1.14.3",
"primeng": "^6.0.0-alpha.1",
"rxjs": "^6.2.0",
"rxjs-compat": "^6.2.0",
"sweetalert2": "^7.21.1",
"uglify-js": "1.3.5",
"url-search-params-polyfill": "^4.0.0",
"validate": "3.0.1",
"web-animations-js": "2.3.1",
"zone.js": "0.8.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.6.5",
"@angular/cli": "^6.0.5",
"@angular/compiler-cli": "^6.0.3",
"@types/bootstrap": "3.3.36",
"@types/chartist": "0.9.36",
"@types/jasmine": "2.6.0",
"@types/jquery": "3.2.13",
"@types/node": "^8.10.17",
"angular-ide": "^0.9.41",
"jasmine-core": "2.8.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "^2.0.2",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.3.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2",
"lite-server": "^2.3.0",
"protractor": "^5.3.2",
"ts-node": "3.3.0",
"tslint": "5.7.0",
"typescript": "^2.7.2"
}
}