Sunday, August 19, 2018

AngularMaterialDemo/node_modules/rxjs/Rx"' has no exported member 'Subscribable'

I am implementing a sample application in Angular with AngularMaterial and FlexLayout .

I have successfully installed and implementing Angular Material Components.I have also installed Flex using the below command

npm install @angular/flex-layout --save

But when I am running my application I am getting the following warning message in my Eclipse Terminal as shown below

enter image description here

And I am also getting the following error in my console.

enter image description here

Below shown is package.json file

package.json:

{
  "name": "angular-material-demo",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/cdk": "^5.0.3",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/flex-layout": "^6.0.0-beta.16",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/material": "^5.0.3",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@types/jwt-decode": "^2.2.1",
    "core-js": "^2.4.1",
    "font-awesome": "^4.6.3",
    "hammerjs": "^2.0.8",
    "jwt-decode": "^2.2.0",
    "primeng": "^2.0.5",
    "rxjs": "^5.5.2",
    "web-animations-js": "^2.3.1",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.6.0",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "angular-ide": "^0.9.38",
    "codelyzer": "^4.0.1",
    "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.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2"
  }
}

I tried doing the below steps also.

Edited package.json: Had to change my version for @angular/compiler-cli. In my case I had to bring it back to 5.2.0, as it somehow got to 5.2.10.

Deleted the node_modules directory.

Ran: npm install

Installed: npm install @angular/flex-layout.

But again i ran in different errors. I also tried changing the version of flex from "@angular/flex-layout": "^6.0.0-beta.16" to "@angular/flex-layout": "^2.0.0-beta.12" in package.json file but I am still getting these errors.

Can anybody please help me to resolve this issue...?

Solved

Your problem is caused by having an old version of npm. To check you version use:

npm -v

Using apt install a very old version (3.5.2) of npm is installed. Upgrade to the latest by:

sudo npm install -g npm

Check your version again, you may have to open a terminal for it to refresh. As of July 4, 2018 the latest npm is 6.1.0. Clear the node_modules folder and redownload the modules:

rm -rf ./node_modules
npm install

try to upgrade your versions to

"typescript": "2.7.2" 
"@angular/cdk": "^5.2.4"
"@angular/material": "^5.2.4"

issue


No comments:

Post a Comment