Npm is not working

Remove that line of course. Then delete package-lock.json and node_modules and run npm install again.

npm outdated is working. i want to know showing packages are need to update to latest version.

Regarding what?

Ionic? Then probably app-scripts
Cordova? You seem to miss most of the packages.

What is your ionic info output now?

d:\ionic\event>ionic info
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.0.6 (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.8

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.1.1, browser 5.0.3

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v8.9.4 (C:\Program Files\nodejs\node.exe)
   npm               : 6.3.0
   OS                : Windows 10

Environment:

   ANDROID_HOME : C:\Users\ismail\AppData\Local\Android\Sdk

Upgrade that and you should be fine regarding your dependencies.

npm outdated all package are updated but only show below “cordova-plugin-local-notification”.

d:\ionic\event>npm outdated
Package                                 Current        Wanted        Latest  Location
cordova-plugin-local-notification  0.9.0-beta.3  0.9.0-beta.3  0.9.0-beta.2  ionic-hello-world

and when project run in android device then error shows.
Untitled

That’s not the best idea - just because there is a new version, doesn’t mean that all libraries work with it. Ionic Angular for example need specific versions of rxjs, zone.js and Typescript to work.

What should I do now?

Reset to the git commit before you decided to uprgade everything - or create a new app with ionic start and see what dependencies currently work for Ionic.

Can i use below json file to downgrade all package. old backup package.json below. is it possible to downgrade all packages?

{
  "name": "ionic-hello-world",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "5.2.9",
    "@angular/common": "5.2.9",
    "@angular/compiler": "5.2.9",
    "@angular/compiler-cli": "5.2.9",
    "@angular/core": "5.2.9",
    "@angular/forms": "5.2.9",
    "@angular/http": "5.2.9",
    "@angular/platform-browser": "5.2.9",
    "@angular/platform-browser-dynamic": "5.2.9",
    "@ionic-native/app-update": "^4.11.0",
    "@ionic-native/app-version": "^4.11.0",
    "@ionic-native/camera": "^4.5.3",
    "@ionic-native/core": "4.5.3",
    "@ionic-native/file": "4.5.3",
    "@ionic-native/file-path": "4.5.3",
    "@ionic-native/file-transfer": "4.5.3",
    "@ionic-native/google-maps": "4.5.3",
    "@ionic-native/http": "^4.11.0",
    "@ionic-native/local-notifications": "^4.11.0",
    "@ionic-native/splash-screen": "4.5.3",
    "@ionic-native/sqlite": "4.5.3",
    "@ionic-native/status-bar": "4.5.3",
    "@ionic-native/transfer": "4.5.3",
    "@ionic/storage": "2.1.3",
    "cordova": "^8.0.0",
    "cordova-android": "7.1.1",
    "cordova-browser": "^5.0.3",
    "cordova-plugin-advanced-http": "^1.11.1",
    "cordova-plugin-app-update": "^1.6.0",
    "cordova-plugin-app-version": "^0.1.9",
    "cordova-plugin-badge": "^0.8.7",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-compat": "^1.1.0",
    "cordova-plugin-console": "1.0.5",
    "cordova-plugin-device": "1.1.4",
    "cordova-plugin-file": "^4.3.3",
    "cordova-plugin-file-transfer": "^1.6.3",
    "cordova-plugin-filepath": "^1.0.2",
    "cordova-plugin-googlemaps": "^1.4.5",
    "cordova-plugin-local-notification": "^0.9.0-beta.2",
    "cordova-plugin-splashscreen": "~4.0.1",
    "cordova-plugin-statusbar": "2.2.2",
    "cordova-plugin-whitelist": "1.3.1",
    "cordova-sqlite-storage": "~2.0.4",
    "ionic-angular": "3.9.2",
    "ionic-plugin-keyboard": "~2.2.1",
    "ionicons": "3.0.0",
    "ng2-translate": "^5.0.0",
    "npm": "^6.3.0",
    "remove": "^0.1.5",
    "rxjs": "5.5.7",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.20"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "~2.6.2"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "ecommerce: An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-console": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "cordova-sqlite-storage": {},
      "ionic-plugin-keyboard": {},
      "cordova-plugin-googlemaps": {
        "API_KEY_FOR_ANDROID": "AIzaSyBHd4Q4dJOfZ074as6v5xHQzIYKnZ0nyb8"
      },
      "cordova-plugin-camera": {},
      "cordova-plugin-file": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-filepath": {},
      "cordova-plugin-app-version": {},
      "cordova-plugin-app-update": {},
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-local-notification": {}
    },
    "platforms": [
      "browser"
    ]
  }
}

**** I have created new project(side menu) whose package.json file below. Now Ionic uses below dependencies version for new project.

{
  "name": "sideMenuApp",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "~4.11.0",
    "@ionic-native/splash-screen": "~4.11.0",
    "@ionic-native/status-bar": "~4.11.0",
    "@ionic/storage": "2.1.3",
    "cordova-android": "7.0.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.2",
    "cordova-plugin-ionic-webview": "^2.0.2",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.11",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android"
    ]
  }
}

Above you learned that @ionic-native/transfer does not exist any more. Now you ask again if you can switch to a package.json that include that?

Obvious answer: no.

Those are the ones that are probably causing problems when you upgraded everything by blindly following npm outdated.

i know @ionic-native/transfer is not exists. i will remove this line. then can i downgrade?

You can do whatever you want - if it will work I don’t know. I am not going to recheck all you individual dependencies. I mentioned multiple times now that what ionic start produces is safe.

After creating new project. i have add cordova platform.

d:\ionic\btrc_event>ionic cordova plugin ls
> cordova plugin ls
cordova-plugin-advanced-http 1.11.1 "Advanced HTTP plugin"
cordova-plugin-app-update 1.6.0 "AppUpdate"
cordova-plugin-appversion 1.0.0 "App Version"
cordova-plugin-badge 0.8.7 "Badge"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.3 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.4.0 "Cordova sqlite storage plugin"
net.js:701
    throw new TypeError(
    ^

TypeError: Invalid data, chunk must be a string or buffer, not object
    at WriteStream.Socket.write (net.js:701:11)
    at process.<anonymous> (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic\bin\ionic:9:63)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emitPendingUnhandledRejections (internal/process/promises.js:94:22)
    at process._tickCallback (internal/process/next_tick.js:189:7)
d:\ionic\btrc_event>ionic info
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)  : 4.0.6 (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.11

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : not available

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v8.9.4 (C:\Program Files\nodejs\node.exe)
   npm               : 5.6.0
   OS                : Windows 10

Environment:

   ANDROID_HOME : C:\Users\ismail\AppData\Local\Android\Sdk

That has nothing to do with npm. Open a new topic please, or as this seems to happen inside ionic an issue at the Ionic CLI’s Github repository issues.

If you are still facing any issue then check this useful guide it might help you.