Saturday, March 2, 2019

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 

Module not found: Error: Can't resolve 'hammerjs'

Hi Guys ,

Today I have faced this error :

Module not found: Error: Can't resolve 'hammerjs'

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 hammerjs

Once installed ng serve,it should work.

Generally we get Module not found error means a module is missing . So we need to install the missing module in node js through npm tool.
After the module is installed verify the path ../node_modules there should be a folder created like this.

\hammerjs

The app should be restarted .

ec2-user@ec2 Permission denied