Saturday, March 2, 2019

ERROR Error: Found the synthetic property @transitionMessages.

Hi Guys ,

Today I have faced this error :

ERROR Error: Found the synthetic property @transitionMessages.

The fix is to add the following modules to your ng module file .

------------app.module.ts---------------------------------------------------------

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { HttpModule } from '@angular/http';
import {MatSelectModule} from '@angular/material/select';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

const appRoutes:Routes =[
{path:'cust-detail',component: CustDetailComponent},
{path:'mcq',component: MCQComponent},
{path:'sign-up',component: SignUpComponent}
];

@NgModule({
  declarations: [
    AppComponent,
    CustDetailComponent,
    MCQComponent,
    SignUpComponent
  ],
  imports: [
    BrowserModule,
FormsModule,
MatSelectModule,
BrowserAnimationsModule
  ],
  providers: [QuizServiceService],
  bootstrap: [AppComponent]
})
export class AppModule { }

----------------------------------------------------------------------------------------
This error comes if you are using mat-select and mat-option . This is required module so we need to import it to make the select functionality work .

The full stack trace is as below :


ERROR Error: Found the synthetic property @transitionMessages. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.
    at checkNoSyntheticProp (platform-browser.js:1141)
    at DefaultDomRenderer2.push../node_modules/@angular/platform-browser/fesm5/platform-browser.js.DefaultDomRenderer2.setProperty (platform-browser.js:1125)
    at DebugRenderer2.push../node_modules/@angular/core/fesm5/core.js.DebugRenderer2.setProperty (core.js:11505)
    at setElementProperty (core.js:8261)
    at checkAndUpdateElementValue (core.js:8212)
    at checkAndUpdateElementInline (core.js:8159)
    at checkAndUpdateNodeInline (core.js:10503)
    at checkAndUpdateNode (core.js:10469)
    at debugCheckAndUpdateNode (core.js:11102)
    at debugCheckRenderNodeFn (core.js:11088)
View_MatFormField_10 @ MatFormField.html:1
push../node_modules/@angular/core/fesm5/core.js.DebugContext_.logError @ core.js:11306
push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:1719
(anonymous) @ core.js:4578
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push../node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:3779
push../node_modules/@angular/core/fesm5/core.js.ApplicationRef.tick @ core.js:4578
(anonymous) @ core.js:4462
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
onInvoke @ core.js:3820
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:390
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push../node_modules/@angular/core/fesm5/core.js.NgZone.run @ core.js:3734
next @ core.js:4462
schedulerFn @ core.js:3551
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:196
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:134
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:77
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47
push../node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:3535
checkStable @ core.js:3789
onHasTask @ core.js:3833
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.hasTask @ zone.js:443
push../node_modules/zone.js/dist/zone.js.ZoneDelegate._updateTaskCount @ zone.js:463
push../node_modules/zone.js/dist/zone.js.Zone._updateTaskCount @ zone.js:291
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:212
drainMicroTaskQueue @ zone.js:601
Promise.then (async)
scheduleMicroTask @ zone.js:584
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:413
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ zone.js:258
scheduleResolveOrReject @ zone.js:879
ZoneAwarePromise.then @ zone.js:1012
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ core.js:4345
./src/main.ts @ main.ts:11
__webpack_require__ @ bootstrap:76
0 @ main.ts:12
__webpack_require__ @ bootstrap:76
checkDeferredModules @ bootstrap:43
webpackJsonpCallback @ bootstrap:30
(anonymous) @ main.js:1

ERROR in node_modules/rxjs-compat/operator/shareReplay.d.ts(2,10): error TS2305:

Hi Guys ,

Today I have faced this error :


ERROR in node_modules/rxjs-compat/operator/shareReplay.d.ts(2,10): error TS2305:



You will face this error if you are using "rxjs-compat": "^6.4.0", in package .json .

To fix set the version of rxjs and rxjs-compat as below .

---------------------package.json--------------------------------

"rxjs": "6.3.3",
    "rxjs-compat": "6.3.3"

----------------------------------------------------------------------

update to package.json needs npm update
ng serve , it works !

The full stack trace is as below :


ERROR in node_modules/rxjs-compat/operator/shareReplay.d.ts(2,10): error TS2305: Module '"F://study/angular4/projects/mcq/mcq/node_modules/rxjs/internal-compatibility/index"' has no exported member 'ShareReplayConfig'.





Friday, March 1, 2019

ERROR in node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.

Hi Guys ,

Today I have faced this error :


ERROR in node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.


I faced this error since i didn't installed material module. Here's the solution if you face the same  issue.
Go to the command prompt and type the following command:

npm install --save rxjs-compat 

Once installed ng serve,it should work.


The full stack trace is as below :



ERROR in node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/rxjs/Rx.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat'.
src/app/quiz-service.service.ts(4,10): error TS2305: Module '"F:/shahbaz/study/angular4/projects/mcq/mcq/node_modules/rxjs/Observable"' has no exported member 'Observable'.
src/app/quiz-service.service.ts(14,5): error TS2339: Property 'map' does not exist on type 'Observable<Response>'.

ERROR Error: Found the synthetic property @transitionMessages. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.

Hi Guys ,

Today I have faced this error :



ERROR Error: Found the synthetic property @transitionMessages. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.


The solution is to add  in the @Component annotation use animations: [ <specify your Animation Method here> ]


compiler.js:1021 Uncaught Error: Template parse errors: 'mat-form-field' is not a known element:


Hi Guys ,

Today I have faced this error :

compiler.js:1021 Uncaught Error: Template parse errors: 'mat-form-field' is not a known element:

The solution to this is to import the required mat modules in app.module.ts  highlighted below .

----------------app.module.ts-----------------------------------------------------------------------------
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatButtonModule, MatInputModule, MatCardModule } from '@angular/material';
import 'hammerjs';

import { AppComponent } from './app.component';
import { LoginComponent } from './login/login.component';

@NgModule({
  declarations: [
    AppComponent,
    LoginComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    ReactiveFormsModule,
    BrowserAnimationsModule,
    MatButtonModule,
    MatInputModule,
    MatCardModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
------------------------------------------------------------------------------------------------------
Test your understanding
angular-cli.json was deprecated in which version ?
v5
v4
v6
v7
Info
Next

Monday, February 25, 2019

Sonarqube


  • Installation


  1. chmod 777 sonarqube_installation.sh && . /root/sonarqube_installation.sh
  2. /sonar/sonarqube-6.7.5/bin/linux-x86-64/sonar.sh console



  • Install

chmod 777 sonarqube_installation.sh && . /root/sonarqube_installation.sh &


  • scanning of a project
  1. edit sonar-scanner.properties
  2. sonar-scanner

Sunday, February 24, 2019

ERROR in src/app/app.module.ts(6,10): error TS2305: Module '/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'

Hi Guys ,

Today I have faced this error :


ERROR in src/app/app.module.ts(6,10): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'.

I got this error just after I installed angular meterial module which was missing.

The full stack trace is as below :


ERROR in src/app/app.module.ts(6,10): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdButtonModule'.
src/app/app.module.ts(6,26): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdInputModule'.
src/app/app.module.ts(6,41): error TS2305: Module '"F:/shahbaz/study/angular4/projects/reactiveForm/FormVal/node_modules/@angular/material/material"' has no exported member 'MdCardModule'.



The solution is to replace modules which are deprecated in angular material with new ones.

MdButtonModule MdInputModule MdCardModule should be replaced with MatButtonModule MatInputModule MatCardModule 

ec2-user@ec2 Permission denied