kaniarasan
kaniarasan

Reputation: 33

Unable to migrate to angular 5 getting invalid error on angular files

Hi i have created an angular app in angular 4.4.3 below are my dependencies

"dependencies": {
    "@angular/animations": "^4.4.3",
    "@angular/cdk": "^5.0.0-rc0",
    "@angular/common": "^4.4.3",
    "@angular/compiler": "^4.4.3",
    "@angular/core": "^4.4.3",
    "@angular/forms": "^4.4.3",
    "@angular/http": "^4.4.3",
    "@angular/material": "^5.0.0-rc0",
    "@angular/platform-browser": "^4.4.3",
    "@angular/platform-browser-dynamic": "^4.4.3",
    "@angular/platform-server": "^4.4.3",
    "@angular/router": "^4.4.3",
    "@types/bootstrap-datepicker": "0.0.9",
    "@types/bootstrap.v3.datetimepicker": "^4.17.41",
    "@types/daterangepicker": "^2.1.10",
    "@types/icheck": "^0.8.29",
    "@types/jquery-knob": "^1.2.29",
    "@types/jquery.slimscroll": "^1.3.31",
    "@types/jqueryui": "^1.11.35",
    "admin-lte": "2.3.11",
    "bootstrap": "^3.3.7",
    "bootstrap-datepicker": "^1.7.1",
    "bootstrap3-wysihtml5-bower": "^0.3.3",
    "core-js": "^2.4.1",
    "daterangepicker": "^2.1.25",
    "ej-angular2": "^15.3.34",
    "electron": "^1.7.9",
    "font-awesome": "^4.7.0",
    "icheck": "^1.0.2",
    "install": "^0.10.1",
    "ionicons": "^2.0.1",
    "jquery": "^2.2.3",
    "jquery-knob": "^1.2.11",
    "jquery-slimscroll": "^1.3.8",
    "jquery-sparkline": "^2.4.0",
    "jqueryui": "^1.11.1",
    "moment": "^2.18.1",
    "morris.js": "^0.5.0",
    "ng-bootstrap-form-validation": "^1.0.10",
    "ng2-growl": "0.0.7",
    "ng4-loading-spinner": "^1.0.27",
    "npm": "^5.3.0",
    "raphael": "^2.2.7",
    "rxjs": "^5.4.3",
    "syncfusion-javascript": "^15.3.33",
    "typescript": "^2.4.2",
    "zone.js": "^0.8.17"
  },
  "devDependencies": {
    "@angular/cli": "^1.4.3",
    "@angular/compiler-cli": "^4.4.3",
    "@angular/language-service": "^4.4.3",
    "@types/ej.web.all": "^15.3.4",
    "@types/jasmine": "~2.6.0",
    "@types/jasminewd2": "~2.0.2",
    "@types/jquery": "^2.0.48",
    "@types/morris.js": "^0.5.6",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.0",
    "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",
    "protractor": "~5.1.2",
    "ts-node": "~3.3.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2"
  }

when i try to migrate it to Angular 5 with the migrate tag defined in [https://angular-update-guide.firebaseapp.com/]

npm install @angular/animations@'^5.0.0' @angular/common@'^5.0.0' @angular/compiler@'^5.0.0' @angular/compiler-cli@'^5.0.0' @angular/core@'^5.0.0' @angular/forms@'^5.0.0' @angular/http@'^5.0.0' @angular/platform-browser@'^5.0.0' @angular/platform-browser-dynamic@'^5.0.0' @angular/platform-server@'^5.0.0' @angular/router@'^5.0.0' [email protected] rxjs@'^5.5.2'

npm install [email protected] --save-exact

when i try to run this code getting non exist version issue on rxjs

so i tried to install latest scripts with the help of below code

npm install @angular/animations@latest @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest [email protected] rxjs@latest

Getting the invalid error on angular files itself

+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
| +-- [email protected]
| | +-- [email protected]
| | | +-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | | `-- [email protected]
| | | | | |   +-- [email protected]
| | | | | |   +-- [email protected]
| | | | | |   +-- [email protected]
| | | | | |   | +-- [email protected]
| | | | | |   | | `-- [email protected]
| | | | | |   | `-- [email protected]
| | | | | |   `-- [email protected]
| | | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | | `-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | |     `-- [email protected]
| | | `-- [email protected]
| | |   `-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | | `-- [email protected]
| | +-- [email protected]
| | `-- [email protected]
| |   +-- [email protected]
| |   +-- [email protected]
| |   | `-- [email protected]
| |   |   +-- [email protected]
| |   |   `-- [email protected]
| |   +-- [email protected]
| |   | +-- [email protected]
| |   | +-- [email protected]
| |   | +-- [email protected]
| |   | +-- [email protected]
| |   | +-- [email protected]
| |   | `-- [email protected]
| |   `-- [email protected]
| +-- [email protected]
| +-- [email protected]
| `-- [email protected]
|   +-- [email protected]
|   | `-- [email protected]
|   +-- [email protected]
|   `-- [email protected]
+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
+-- @angular/[email protected]  invalid
| `-- [email protected]
+-- @angular/[email protected]  invalid
| +-- [email protected]
| `-- [email protected]
+-- @angular/[email protected]  invalid
+-- [email protected]
| `-- [email protected]
+-- [email protected]  invalid
`-- UNMET DEPENDENCY zone.js@^0.8.17 

My node version is 3.10.10

Let me know is this the correct way or am i missing something

Upvotes: 1

Views: 881

Answers (1)

Melchia
Melchia

Reputation: 24244

There is maybe an issue with 5.0.2 version Try this

npm install @angular/{animations,common,compiler,compiler-cli,core,forms,http,platform-browser,platform-browser-dynamic,platform-server,router}@5.0.0

You need also to update node.js & npm. Install the latest lts

Upvotes: 1

Related Questions