akveo / ngx-admin

Customizable admin dashboard template based on Angular 10+
https://akveo.github.io/ngx-admin/
MIT License
25.14k stars 7.95k forks source link

Errors after upgrading Angular #5786

Open cscrum opened 3 years ago

cscrum commented 3 years ago

I recently had to update node to v14 for another project and it broke my nebular projects. I decided to go ahead and update Angular as well and as many packages as I could to get them working again, but am still running into errors. Currently I am running: Angular CLI: 10.1.6 Node: 14.13.0 OS: win32 x64

Angular: 11.0.0-next.5 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.12 @angular-devkit/build-angular 0.1001.6 @angular-devkit/core 9.1.12 @angular-devkit/schematics 9.1.12 @angular/cdk 10.2.4 @angular/cli 10.1.6 @schematics/angular 9.1.12 @schematics/update 0.901.12 rxjs 6.6.3 typescript 4.0.3

Here are the errors:

ERROR in src/app/@core/mock/mock-data.module.ts:57:21 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).

57 static forRoot(): ModuleWithProviders {

src/app/@core/mock/mock-data.module.ts:58:13 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

58     return <ModuleWithProviders>{

src/app/@core/core.module.ts:160:21 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).

160 static forRoot(): ModuleWithProviders {

src/app/@core/core.module.ts:161:13 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

161     return <ModuleWithProviders>{

src/app/@theme/theme.module.ts:79:21 - error TS2314: Generic type 'ModuleWithProviders' requires 1 type argument(s).

79 static forRoot(): ModuleWithProviders {

src/app/@theme/theme.module.ts:80:13 - error TS2314: Generic type 'ModuleWithProviders<T>' requires 1 type argument(s).

80     return <ModuleWithProviders>{

package.json is: { "name": "reliable-admin", "version": "4.0.1", "license": "MIT", "repository": { "type": "git", "url": "git+https://github.com/akveo/ngx-admin.git" }, "bugs": { "url": "https://github.com/akveo/ngx-admin/issues" }, "scripts": { "ng": "ng", "conventional-changelog": "conventional-changelog", "start": "ng serve", "build": "ng build", "build:prod": "npm run build -- --prod --aot", "test": "ng test", "test:coverage": "rimraf coverage && npm run test -- --code-coverage", "lint": "ng lint", "lint:fix": "ng lint ngx-admin-demo --fix", "lint:styles": "stylelint ./src/*/.scss", "lint:ci": "npm run lint && npm run lint:styles", "pree2e": "webdriver-manager update --standalone false --gecko false", "e2e": "ng e2e", "docs": "compodoc -p src/tsconfig.app.json -d docs", "docs:serve": "compodoc -p src/tsconfig.app.json -d docs -s", "prepush": "npm run lint:ci", "release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s" }, "dependencies": { "@agm/core": "^1.1.0", "@angular/animations": "^11.0.0-next.5", "@angular/cdk": "^10.2.4", "@angular/common": "^11.0.0-next.5", "@angular/compiler": "^11.0.0-next.5", "@angular/core": "^11.0.0-next.5", "@angular/forms": "^11.0.0-next.5", "@angular/platform-browser": "^11.0.0-next.5", "@angular/platform-browser-dynamic": "^11.0.0-next.5", "@angular/router": "^11.0.0-next.5", "@asymmetrik/ngx-leaflet": "^6.0.1", "@nebular/auth": "6.2.1", "@nebular/eva-icons": "4.1.2", "@nebular/security": "6.2.1", "@nebular/theme": "6.2.1", "angular-common": "^0.1.0", "angular-datatables": "^9.0.1", "angular-google-charts": "^0.1.6", "angular-ng-autocomplete": "^2.0.1", "angular2-chartjs": "0.4.1", "angular2-toaster": "^7.0.0", "bootstrap": "4.3.1", "chart.js": "^2.8.0", "ckeditor": "4.7.3", "classlist.js": "1.1.20150312", "core-js": "2.5.1", "datatables.net": "^1.10.21", "datatables.net-buttons": "^1.6.2", "datatables.net-buttons-dt": "^1.6.2", "datatables.net-dt": "^1.10.21", "echarts": "^4.0.2", "eva-icons": "^1.1.0", "intl": "1.2.5", "ionicons": "2.0.1", "jszip": "^3.5.0", "leaflet": "^1.6.0", "leaflet-bing-layer": "^3.3.1", "nebular-icons": "1.1.0", "ng2-ckeditor": "^1.2.2", "ng2-completer": "2.0.8", "ng2-file-upload": "^1.4.0", "node-vincenty": "0.0.6", "normalize.css": "6.0.0", "pace-js": "1.0.2", "roboto-fontface": "0.8.0", "rxjs": "6.6.3", "rxjs-compat": "6.3.0", "socicon": "3.0.5", "tinymce": "4.5.7", "tslib": "^2.0.3", "typeface-exo": "0.0.22", "web-animations-js": "^2.3.2", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1001.6", "@angular/cli": "^10.1.6", "@angular/compiler-cli": "^11.0.0-next.5", "@angular/language-service": "11.0.0-next.5", "@compodoc/compodoc": "^1.1.10", "@fortawesome/fontawesome-free": "^5.2.0", "@swimlane/ngx-charts": "^16.0.0", "@types/d3-color": "1.0.5", "@types/datatables.net": "^1.10.19", "@types/datatables.net-buttons": "^1.4.3", "@types/googlemaps": "^3.30.4", "@types/jasmine": "2.5.54", "@types/jasminewd2": "2.0.3", "@types/jquery": "^3.3.38", "@types/leaflet": "^1.2.3", "@types/node": "^12.11.1", "angular-tree-component": "^8.5.6", "codelyzer": "^5.1.2", "conventional-changelog-cli": "1.3.4", "husky": "0.13.3", "jasmine-core": "2.6.4", "jasmine-spec-reporter": "4.1.1", "jquery": "^3.5.1", "karma": "1.7.1", "karma-chrome-launcher": "2.1.1", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.3.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "ng2-smart-table": "^1.7.0", "ngx-echarts": "^5.1.2", "node-sass": "^4.12.0", "npm-run-all": "4.0.2", "protractor": "5.1.2", "rimraf": "2.6.1", "stylelint": "7.13.0", "ts-node": "3.2.2", "tslint": "~6.1.0", "tslint-language-service": "^0.9.9", "typescript": "4.0.3" } }

Looking for any advice.

cscrum commented 3 years ago

OK so I found out that in core there are changes to address this, but I was unsure how to update core. ng update @nebular/core does not work. So, I just pulled the files from the repo directly and copied them in. I did update @themes with ng update, but there was still a problem there as well, so I pulled that as well. I'm wondering why the ng update did not grab the new files? I got it work, but maybe someone wants to find out why these don't update?

gks0089 commented 3 years ago

Hi, can i know how you make it run? i downloaded but cannot run, show me "ERROR in The target entry-point "ng2-smart-table" has missing dependencies:

I have try all these

npm install ng update npm update npm i @akveo/ng2-completer npm i rxjs-compat --save npm i @akveo/ng2-completer --save

dev-gavinfang commented 3 years ago

Hi, can i know how you make it run? i downloaded but cannot run, show me "ERROR in The target entry-point "ng2-smart-table" has missing dependencies:

  • ng2-completer"

I have try all these

npm install ng update npm update npm i @akveo/ng2-completer npm i rxjs-compat --save npm i @akveo/ng2-completer --save

Have you tried : npm install ng2-completer --save-dev ?

gks0089 commented 3 years ago

Hi, It's working now, thx...

gilsonbridge commented 3 years ago

npm i @akveo/ng2-completer --save

Doesn't work for me!