Skip to content

Commit

Permalink
Various
Browse files Browse the repository at this point in the history
- Remove redundant dependencies responsible for multiple copies of RxJS
- Add reflect-metadata to test.ts to fix travis test failure
- Fix protractor port number
- Add type casts to fix ___ has no properties in common with type 'Component' errors
  • Loading branch information
dancancro committed Oct 11, 2017
1 parent 23f1adc commit da3d500
Show file tree
Hide file tree
Showing 36 changed files with 1,756 additions and 1,439 deletions.
27 changes: 27 additions & 0 deletions docs/contents/articles/102-troubleshooting.md
@@ -0,0 +1,27 @@
ERRORS like
> Type 'Subscription' is not assignable to type 'Subscription'. Two different types with this name exist, but they are unrelated.
FIX:
This means that you have multiple copies of a dependency each with a different version. You can run this to see which of your
dependencies are including it in their own `node_modules` directories:
> find ./node_modules/ -type d -name "rxjs"
Then delete from your package.json any direct dependencies that are provided indirectly another way. You will get the version
required by that other indirect dependency



ERROR:
ERROR in [at-loader] ./src/main/webapp/app/admin/user-management/user-management-delete-dialog.component.ts:53:56
TS2559: Type 'typeof UserMgmtDeleteDialogComponent' has no properties in common with type 'Component'.

FIX:
Type cast UserMgmtDeleteDialogComponent to Component: <Component>UserMgmtDeleteDialogComponent



ERROR:
reflect-metadata shim is required when using class decorators

FIX:
Add var reflect = require('reflect-metadata'); to test.ts
3 changes: 2 additions & 1 deletion karma.conf.js
Expand Up @@ -14,7 +14,8 @@ module.exports = (config) => {

// list of files / patterns to load in the browser
files: [
'test.ts'
'test.ts',
'node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css'
],


Expand Down
31 changes: 3 additions & 28 deletions package.json
Expand Up @@ -43,7 +43,6 @@
"bootstrap": "4.0.0-beta",
"chart.js": "1.1.1",
"chartist": "0.11.0",
"core-js": "2.5.1",
"easy-pie-chart": "2.1.7",
"firebase": "4.4.0",
"font-awesome": "4.7.0",
Expand All @@ -53,7 +52,6 @@
"ionicons": "4.0.0-6",
"jquery": "3.2.1",
"jquery-slimscroll": "1.3.8",
"leaflet": "1.2.0",
"leaflet-map": "0.2.1",
"moment": "2.18.1",
"ng-jhipster": "0.2.12",
Expand All @@ -68,35 +66,25 @@
"ngx-uploader": "3.3.11",
"normalize.css": "7.0.0",
"reflect-metadata": "0.1.10",
"reselect": "3.0.1",
"roboto-fontface": "0.8.0",
"rxjs": "5.5.0-beta.0",
"simple-peer": "8.1.1",
"sockjs-client": "1.1.4",
"sortablejs": "1.6.1",
"string_decoder": "1.0.3",
"swagger-ui": "3.2.2",
"tabtab": "2.2.2",
"tether": "1.4.0",
"ts-helpers": "1.1.2",
"webstomp-client": "1.0.8",
"zone.js": "0.8.17"
"webstomp-client": "1.0.8"
},
"devDependencies": {
"@angular/cli": "1.5.0-beta.1",
"@angular/cli": "1.3.0-rc.0",
"@angular/compiler-cli": "5.0.0-beta.7",
"@angularclass/hmr": "2.1.3",
"@ngrx/store-devtools": "4.0.0",
"@ngtools/webpack": "1.8.0-beta.1",
"@types/fullcalendar": "3.5.0",
"@types/hammerjs": "2.0.35",
"@types/jasmine": "2.6.0",
"@types/jquery": "3.2.12",
"@types/jquery.slimscroll": "1.3.31",
"@types/leaflet": "1.2.0",
"@types/localforage": "0.0.34",
"@types/node": "8.0.30",
"@types/selenium-webdriver": "3.0.7",
"@types/simple-peer": "6.1.2",
"@types/uuid": "3.4.2",
"@types/webpack-env": "1.13.1",
Expand All @@ -107,12 +95,9 @@
"browser-sync-webpack-plugin": "1.2.0",
"codelyzer": "3.2.0",
"copy-webpack-plugin": "4.0.1",
"css-loader": "0.28.7",
"del": "3.0.0",
"event-stream": "3.3.4",
"exports-loader": "0.6.4",
"extract-text-webpack-plugin": "3.0.0",
"file-loader": "0.11.2",
"generator-jhipster-bootstrap-material-design": "3.5.1",
"generator-jhipster-bootswatch": "1.0.2",
"generator-jhipster-darktheme": "0.0.7",
Expand Down Expand Up @@ -143,46 +128,36 @@
"karma-webpack": "2.0.4",
"lazypipe": "1.0.1",
"lcov-parse": "1.0.0",
"lodash": "4.17.4",
"map-stream": "0.0.7",
"merge-jsons-webpack-plugin": "1.0.11",
"ng-router-loader": "2.1.0",
"ngc-webpack": "3.2.2",
"node-sass": "4.5.3",
"phantomjs-prebuilt": "2.1.15",
"postcss-loader": "2.0.6",
"protractor": "5.1.2",
"protractor-jasmine2-screenshot-reporter": "0.4.1",
"proxy-middleware": "0.15.0",
"raw-loader": "^0.5.1",
"rimraf": "2.6.2",
"run-sequence": "2.2.0",
"rxjs-tslint-rules": "3.0.1",
"sass-lint": "1.11.1",
"sass-loader": "6.0.6",
"source-map-explorer": "1.5.0",
"sourcemap-istanbul-instrumenter-loader": "0.2.0",
"string-replace-webpack-plugin": "0.1.3",
"style-loader": "0.18.2",
"sw-precache": "5.2.0",
"tabtab": "2.2.2",
"to-string-loader": "1.1.5",
"ts-node": "3.3.0",
"tslint": "5.7.0",
"tslint-loader": "3.5.3",
"typedoc": "0.8.0",
"typedoc-plugin-external-module-name": "1.0.9",
"typescript": "2.3.4",
"web-app-manifest-loader": "0.1.1",
"webdriver-manager": "12.0.6",
"webpack": "3.6.0",
"webpack-dev-server": "2.8.2",
"webpack-merge": "4.1.0",
"webpack-notifier": "1.5.0",
"webpack-visualizer-plugin": "0.1.11",
"write-file-webpack-plugin": "4.1.0",
"xml2js": "0.4.19",
"yargs": "9.0.1"
"write-file-webpack-plugin": "4.1.0"
},
"engines": {
"node": "6.11.0"
Expand Down
2 changes: 1 addition & 1 deletion protractor.conf.js
Expand Up @@ -19,7 +19,7 @@ exports.config = {

directConnect: true,

baseUrl: 'http://localhost:8070/',
baseUrl: 'http://localhost:9010/',

framework: 'jasmine2',

Expand Down
Expand Up @@ -27,16 +27,18 @@ export class UserMgmtDeleteDialogComponent {

confirmDelete(login) {
this.userService.delete(login).subscribe((response) => {
this.eventManager.broadcast({ name: 'userListModification',
content: 'Deleted a user'});
this.eventManager.broadcast({
name: 'userListModification',
content: 'Deleted a user'
});
this.activeModal.dismiss(true);
});
}
}

@Component({
selector: 'jhi-user-delete-dialog',
template: ''
template: '<a>'
})
export class UserDeleteDialogComponent implements OnInit, OnDestroy {

Expand All @@ -46,11 +48,11 @@ export class UserDeleteDialogComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private userModalService: UserModalService
) {}
) { }

ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.userModalService.open(UserMgmtDeleteDialogComponent, params['login']);
this.modalRef = this.userModalService.open(<Component>UserMgmtDeleteDialogComponent, params['login']);
});
}

Expand Down
Expand Up @@ -77,9 +77,9 @@ export class UserDialogComponent implements OnInit, OnDestroy {
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
if (params['login']) {
this.modalRef = this.userModalService.open(UserMgmtDialogComponent, params['login']);
this.modalRef = this.userModalService.open(<Component>UserMgmtDialogComponent, params['login']);
} else {
this.modalRef = this.userModalService.open(UserMgmtDialogComponent);
this.modalRef = this.userModalService.open(<Component>UserMgmtDialogComponent);
}
});
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ export class ArticleDeletePopupComponent implements OnInit, OnDestroy {
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.articlePopupService
.open(ArticleDeleteDialogComponent, params['id']);
.open(<Component>ArticleDeleteDialogComponent, params['id']);
});
}

Expand Down
Expand Up @@ -146,10 +146,10 @@ export class ArticlePopupComponent implements OnInit, OnDestroy {
this.routeSub = this.route.params.subscribe((params) => {
if (params['id']) {
this.modalRef = this.articlePopupService
.open(ArticleDialogComponent, params['id']);
.open(<Component>ArticleDialogComponent, params['id']);
} else {
this.modalRef = this.articlePopupService
.open(ArticleDialogComponent);
.open(<Component>ArticleDialogComponent);
}
});
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ export class AuthorDeletePopupComponent implements OnInit, OnDestroy {
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.authorPopupService
.open(AuthorDeleteDialogComponent, params['id']);
.open(<Component>AuthorDeleteDialogComponent, params['id']);
});
}

Expand Down
Expand Up @@ -160,10 +160,10 @@ export class AuthorPopupComponent implements OnInit, OnDestroy {
this.routeSub = this.route.params.subscribe((params) => {
if (params['id']) {
this.modalRef = this.authorPopupService
.open(AuthorDialogComponent, params['id']);
.open(<Component>AuthorDialogComponent, params['id']);
} else {
this.modalRef = this.authorPopupService
.open(AuthorDialogComponent);
.open(<Component>AuthorDialogComponent);
}
});
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ export class ClaimRebuttalDeletePopupComponent implements OnInit, OnDestroy {
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.claimRebuttalPopupService
.open(ClaimRebuttalDeleteDialogComponent, params['id']);
.open(<Component>ClaimRebuttalDeleteDialogComponent, params['id']);
});
}

Expand Down
Expand Up @@ -54,7 +54,7 @@ export class ClaimRebuttalDialogComponent implements OnInit {
}

private onSaveSuccess(result: ClaimRebuttal) {
this.eventManager.broadcast({ name: 'claimRebuttalListModification', content: 'OK'});
this.eventManager.broadcast({ name: 'claimRebuttalListModification', content: 'OK' });
this.isSaving = false;
this.activeModal.dismiss(result);
}
Expand Down Expand Up @@ -86,16 +86,16 @@ export class ClaimRebuttalPopupComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private claimRebuttalPopupService: ClaimRebuttalPopupService
) {}
) { }

ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
if ( params['id'] ) {
if (params['id']) {
this.modalRef = this.claimRebuttalPopupService
.open(ClaimRebuttalDialogComponent, params['id']);
.open(<Component>ClaimRebuttalDialogComponent, params['id']);
} else {
this.modalRef = this.claimRebuttalPopupService
.open(ClaimRebuttalDialogComponent);
.open(<Component>ClaimRebuttalDialogComponent);
}
});
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ export class ClaimDeletePopupComponent implements OnInit, OnDestroy {
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.claimPopupService
.open(ClaimDeleteDialogComponent, params['id']);
.open(<Component>ClaimDeleteDialogComponent, params['id']);
});
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/webapp/app/entities/claim/claim-dialog.component.ts
Expand Up @@ -54,7 +54,7 @@ export class ClaimDialogComponent implements OnInit {
}

private onSaveSuccess(result: Claim) {
this.eventManager.broadcast({ name: 'claimListModification', content: 'OK'});
this.eventManager.broadcast({ name: 'claimListModification', content: 'OK' });
this.isSaving = false;
this.activeModal.dismiss(result);
}
Expand Down Expand Up @@ -86,16 +86,16 @@ export class ClaimPopupComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private claimPopupService: ClaimPopupService
) {}
) { }

ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
if ( params['id'] ) {
if (params['id']) {
this.modalRef = this.claimPopupService
.open(ClaimDialogComponent, params['id']);
.open(<Component>ClaimDialogComponent, params['id']);
} else {
this.modalRef = this.claimPopupService
.open(ClaimDialogComponent);
.open(<Component>ClaimDialogComponent);
}
});
}
Expand Down
Expand Up @@ -36,7 +36,7 @@ export class CommentDeleteDialogComponent {
});
this.activeModal.dismiss(true);
});
this.alertService.success('greatBigExampleApplicationApp.comment.deleted', { param : id }, null);
this.alertService.success('greatBigExampleApplicationApp.comment.deleted', { param: id }, null);
}
}

Expand All @@ -52,12 +52,12 @@ export class CommentDeletePopupComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private commentPopupService: CommentPopupService
) {}
) { }

ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.commentPopupService
.open(CommentDeleteDialogComponent, params['id']);
.open(<Component>CommentDeleteDialogComponent, params['id']);
});
}

Expand Down
14 changes: 7 additions & 7 deletions src/main/webapp/app/entities/comment/comment-dialog.component.ts
Expand Up @@ -91,10 +91,10 @@ export class CommentDialogComponent implements OnInit {
private onSaveSuccess(result: Comment, isCreated: boolean) {
this.alertService.success(
isCreated ? 'greatBigExampleApplicationApp.comment.created'
: 'greatBigExampleApplicationApp.comment.updated',
{ param : result.id }, null);
: 'greatBigExampleApplicationApp.comment.updated',
{ param: result.id }, null);

this.eventManager.broadcast({ name: 'commentListModification', content: 'OK'});
this.eventManager.broadcast({ name: 'commentListModification', content: 'OK' });
this.isSaving = false;
this.activeModal.dismiss(result);
}
Expand Down Expand Up @@ -134,16 +134,16 @@ export class CommentPopupComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private commentPopupService: CommentPopupService
) {}
) { }

ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
if ( params['id'] ) {
if (params['id']) {
this.modalRef = this.commentPopupService
.open(CommentDialogComponent, params['id']);
.open(<Component>CommentDialogComponent, params['id']);
} else {
this.modalRef = this.commentPopupService
.open(CommentDialogComponent);
.open(<Component>CommentDialogComponent);
}
});
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ export class ContactDeletePopupComponent implements OnInit, OnDestroy {
ngOnInit() {
this.routeSub = this.route.params.subscribe((params) => {
this.modalRef = this.contactPopupService
.open(ContactDeleteDialogComponent, params['id']);
.open(<Component>ContactDeleteDialogComponent, params['id']);
});
}

Expand Down

0 comments on commit da3d500

Please sign in to comment.