我正在将我的angular(5+)应用程序的Ag-grid版本更新为版本19。
现在,我检查了官方网页的basic guide,但是当我尝试使用以下命令编译我的应用程序时:ng build --prod --build-optimizer --output-hashing all
无法正常工作,并且控制台向我显示以下输出:,有关此的互联网上的信息非常小,不是空的,我认为是因为它是最新版本。我可以提供的另一项信息是我的package.json
:
{
"name": "multiapp-boilerplate",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve --open --extract-css=true",
"build": "ng build --prod --build-optimizer --output-hashing all",
"build:all": "run-s build:client build:aot",
"build:client": "ng build -prod --build-optimizer --app 0",
"build:aot": "ng build --aot --app 1",
"build:server": "webpack -p",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json"
},
"private": true,
"dependencies": {
"@agm/core": "^1.0.0-beta.3",
"@agm/snazzy-info-window": "^1.0.0-beta.3",
"@amcharts/amcharts4": "^4.0.0-beta.28",
"@angular-devkit/core": "^0.6.8",
"@angular-material-extensions/password-strength": "^3.0.0",
"@angular-redux/store": "^6.5.7",
"@angular/animations": "5.2.11",
"@angular/cdk": "5.2.5",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/core": "5.2.11",
"@angular/flex-layout": "5.0.0-beta.13",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/material": "^5.2.5",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@angular/platform-server": "5.2.11",
"@angular/router": "5.2.11",
"@angular/service-worker": "5.2.11",
"@auth0/angular-jwt": "1.2.0",
"@nguniversal/express-engine": "^5.0.0",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0",
"@ngx-translate/core": "^8.0.0",
"@ngx-translate/http-loader": "^2.0.1",
"@tinymce/tinymce-angular": "^2.0.0",
"@types/d3": "^5.0.0",
"@types/googlemaps": "^3.30.0",
"ag-grid": "^18.1.2",
"ag-grid-angular": "^19.0.0",
"ag-grid-community": "^19.0.0",
"ag-grid-enterprise": "^19.0.0",
"angular-calendar": "^0.24.1",
"angular-split": "^1.0.0-rc.3",
"angular2-grid": "^2.1.0",
"body-parser": "^1.18.3",
"codelyzer": "^4.3.0",
"core-js": "^2.5.4",
"d3": "^5.5.0",
"express": "^4.16.3",
"hammerjs": "^2.0.8",
"js-search": "^1.4.2",
"moment": "^2.22.2",
"ng-drag-drop": "^4.0.0",
"ng2-file-upload": "^1.3.0",
"ng2-validation": "^4.2.0",
"ngx-bootstrap": "^3.0.1",
"ngx-color-picker": "^4.5.0",
"ngx-cookie-service": "^1.0.9",
"ngx-infinite-scroll": "^0.8.3",
"ngx-perfect-scrollbar": "^5.0.0",
"node-sass": "^4.7.2",
"npm-run-all": "^4.1.3",
"redux": "^3.7.2",
"rxjs": "^5.5.11",
"snazzy-info-window": "^1.1.0",
"ts-loader": "^4.4.1",
"webpack-node-externals": "^1.7.2",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/cli": "1.7.4",
"@angular/compiler-cli": "^5.2.11",
"@angular/language-service": "^5.2.11",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^6.0.111",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.4.3",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.3.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "^2.9.2"
}
}
这就是我所拥有的一切,作为额外的信息。 我试图从一个全新的角度项目中进行安装,而没有任何问题,所以我认为这是我的应用程序中的一个问题。
答案 0 :(得分:1)
免费版本的ag-Grid在版本19中重命名为ag-grid-community。
您需要将“ ag-grid”的引用重命名为“ ag-grid-community”:
"ag-grid-angular": "^19.0.0",
"ag-grid-community": "^19.0.0",
"ag-grid-enterprise": "^19.0.0",
您将用“ ag-grid-community”替换“ ag-grid”-您不需要两者。