Npm is not working


#1
d:\ionic\event>npm uninstall --save @ionic-native/core @ionic-native/google-maps
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @ionic-native/transfer@4.5.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'ionic-hello-world'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-08-09T14_55_28_398Z-debug.log

npm outdated is not working. Ican’t any package remove or install.
my ionic info below:

d:\ionic\event>ionic info

Ionic:

   ionic (Ionic CLI)  : 4.0.5 (C:\Users\ismail\AppData\Roaming\npm\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 6.4.0, browser 5.0.3

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

#2

You are specifying two packages at the same time.
If you want to remove google maps native plugin
try only

npm uninstall  --save @ionic-native/google-maps

The --save flag will also remove the entry for that plugin from the project’s package.json file.

IMPORTANT: IF you used the cordova command line to install a plugin that you’re looking to remove then you’ll need to issue commands through that particular tool instead of the Ionic CLI.


#3

This is not working. Error shows.

d:\ionic\event>npm uninstall --save @ionic-native/core
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @ionic-native/transfer@4.5.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'ionic-hello-world'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-08-10T03_22_45_536Z-debug.log

How can i solved this problem?


#4

Your problem is probably with npm, something to do with permissions and files. This happens quite often and is almost impossible to successfully debug (at least here in the forum).

One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.


#5

I’m not understanding what you said. I was used nodejs v8.9.4 for my project. Am i wrong?


#6

Read what I wrote. Using nvm instead of directly node might help.


#7

I have installed nvm-windows. and installed nodejs v8.9.4 using nvm. i am installing npm globally. is it correct?


#8

npm is already installed with node.


#9
d:\ionic\event>ionic cordova run android --device --livereload --verbose -c --address 192.168.0.103
  ionic:cli-utils Terminal info: { tty: true, ci: false } +0ms
  ionic:cli-utils CLI global options: { _: [ 'cordova', 'run', 'android' ], help: null, h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json: null, device: true, livereload: true, c: true, address: '192.168.0.103', project: null, '--': [] } +4ms
  ionic:cli-utils:lib:project Project type from config: Ionic Angular 3 (ionic-angular) +0ms
  ionic:cli-utils Project name: undefined +320ms
  ionic:cli Context: { binPath: 'C:\\Users\\ismail\\AppData\\Roaming\\nvm\\v8.9.4\\node_modules\\ionic\\bin\\ionic', libPath: 'C:\\Users\\ismail\\AppData\\Roaming\\nvm\\v8.9.4\\node_modules\\ionic', execPath: 'd:\\ionic\\event', version: '4.0.6' } +0ms
  ionic:cli-utils:lib:integrations:cordova:config Using config.xml: d:\ionic\event\config.xml +0ms
  ionic:cli-utils:lib:integrations:cordova:config Using config.xml: d:\ionic\event\config.xml +48ms
  ionic:cli-utils:lib:hooks Looking for ionic:serve:before npm script. +0ms
  ionic:cli-framework:utils:network checking for open port on 0.0.0.0:8100 +0ms
  ionic:cli-framework:utils:network checking for open port on 0.0.0.0:35729 +1ms
  ionic:cli-framework:utils:network checking for open port on 0.0.0.0:53703 +1ms
  ionic:cli-framework:utils:network checking for open port on fe80::f519:5e:14f0:6200:8100 +6ms
  ionic:cli-framework:utils:network checking for open port on fe80::f519:5e:14f0:6200:35729 +1ms
  ionic:cli-framework:utils:network checking for open port on fe80::f519:5e:14f0:6200:53703 +1ms
  ionic:cli-framework:utils:network checking for open port on 192.168.0.103:8100 +6ms
  ionic:cli-framework:utils:network checking for open port on 192.168.0.103:35729 +4ms
  ionic:cli-framework:utils:network checking for open port on 192.168.0.103:53703 +1ms
  ionic:cli-framework:utils:network checking for open port on fe80::5d0:24d9:bd18:52db:8100 +5ms
  ionic:cli-framework:utils:network checking for open port on fe80::5d0:24d9:bd18:52db:35729 +5ms
  ionic:cli-framework:utils:network checking for open port on fe80::5d0:24d9:bd18:52db:53703 +1ms
  ionic:cli-framework:utils:network checking for open port on 192.168.222.1:8100 +5ms
  ionic:cli-framework:utils:network checking for open port on 192.168.222.1:35729 +4ms
  ionic:cli-framework:utils:network checking for open port on 192.168.222.1:53703 +0ms
  ionic:cli-framework:utils:network checking for open port on fe80::55bb:2e4c:8a1a:1028:8100 +7ms
  ionic:cli-framework:utils:network checking for open port on fe80::55bb:2e4c:8a1a:1028:35729 +4ms
  ionic:cli-framework:utils:network checking for open port on fe80::55bb:2e4c:8a1a:1028:53703 +0ms
  ionic:cli-framework:utils:network checking for open port on 192.168.133.1:8100 +5ms
  ionic:cli-framework:utils:network checking for open port on 192.168.133.1:35729 +4ms
  ionic:cli-framework:utils:network checking for open port on 192.168.133.1:53703 +0ms
  ionic:cli-framework:utils:network checking for open port on ::1:8100 +6ms
  ionic:cli-framework:utils:network checking for open port on ::1:35729 +4ms
  ionic:cli-framework:utils:network checking for open port on ::1:53703 +0ms
  ionic:cli-framework:utils:network checking for open port on 127.0.0.1:8100 +10ms
  ionic:cli-framework:utils:network checking for open port on 127.0.0.1:35729 +2ms
  ionic:cli-framework:utils:network checking for open port on 127.0.0.1:53703 +0ms
  ionic:cli-utils:lib:project:ionic-angular:serve Looking for ionic:serve npm script. +0ms
  ionic:cli-utils:lib:project:ionic-angular:serve Found ionic:serve, but it is the default. Not running. +15ms
> ionic-app-scripts serve --address 192.168.0.103 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --consolelogs --nobrowser --iscordovaserve --platform android --target cordova
[app-scripts] [14:41:45]  ionic-app-scripts 3.1.8
[app-scripts] 2018-08-10T21:41:45.318Z tinylr:server Configuring HTTP server
[app-scripts] [14:41:45]  watch started ...
[app-scripts] [14:41:45]  build dev started ...
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "x-powered-by" to true
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "etag" to 'weak'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "etag fn" to [Function: generateETag]
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "env" to 'development'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "query parser" to 'extended'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "query parser fn" to [Function: parseExtendedQueryString]
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "subdomain offset" to 2
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "trust proxy" to false
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "trust proxy fn" to [Function: trustNone]
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application booting in development mode
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "view" to [Function: View]
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "views" to 'd:\\ionic\\event\\views'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "jsonp callback name" to 'callback'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:application set "serveConfig" to { httpPort: 8100, host: '192.168.0.103', hostBaseUrl: 'http://192.168.0.103:8100', rootDir: 'd:\\ionic\\event', wwwDir: 'd:\\ionic\\event\\www', buildDir: 'd:\\ionic\\event\\www\\build', isCordovaServe: true, launchBrowser: false, launchLab: false, browserToLaunch: null, useLiveReload: true, liveReloadPort: 35729, notificationPort: 53703, useServerLogs: false, useProxy: true, notifyOnConsoleLog: true, devapp: false }
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router use '/' query
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router use '/' expressInit
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router use '/' serveStatic
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router use '/__ion-dev-server' serveStatic
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/__ion-dev-server'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router use '/ionic-lab/static' serveStatic
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/ionic-lab/static'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/ionic-lab'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/ionic-lab'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/ionic-lab'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/ionic-lab/api/v1/cordova'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/ionic-lab/api/v1/cordova'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/ionic-lab/api/v1/cordova'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/ionic-lab/api/v1/app-config'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/ionic-lab/api/v1/app-config'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/ionic-lab/api/v1/app-config'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/cordova.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/cordova.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/cordova.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/cordova.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/cordova_plugins.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/cordova_plugins.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/cordova_plugins.js'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route new '/plugins/*'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/plugins/*'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:route get '/plugins/*'
[app-scripts] Fri, 10 Aug 2018 21:41:45 GMT express:router:layer new '/'
[app-scripts] [14:41:45]  clean started ...
[app-scripts] [14:41:45]  clean finished in 5 ms
[app-scripts] [14:41:45]  copy started ...
[app-scripts] [14:41:45]  deeplinks started ...
[app-scripts] [14:41:45]  deeplinks finished in 146 ms
[app-scripts] [14:41:45]  transpile started ...
[app-scripts] [14:41:52]  transpile finished in 6.48 s
[app-scripts] [14:41:52]  preprocess started ...
[app-scripts] [14:41:52]  preprocess finished in 1 ms
[app-scripts] [14:41:52]  webpack started ...
[app-scripts] [14:41:52]  copy finished in 7.14 s
[app-scripts] [14:42:01]  webpack finished in 9.30 s
[app-scripts] [14:42:01]  sass started ...
[app-scripts] Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[app-scripts] [14:42:03]  sass finished in 1.54 s
[app-scripts] [14:42:03]  postprocess started ...
[app-scripts] [14:42:03]  postprocess finished in 19 ms
[app-scripts] [14:42:03]  lint started ...
[app-scripts] [14:42:03]  build dev finished in 18.03 s
[app-scripts] [14:42:03]  watch ready in 18.16 s
  ionic:cli-utils:lib:serve awaiting TCP connection to 192.168.0.103:8100 +0ms

[INFO] Development server running!

       Local: http://localhost:8100

       Use Ctrl+C to quit this process

  ionic:cli-utils:lib:events No process.send, not emitting event serve:ready +0ms
> cordova run android --device --verbose
[cordova]  No scripts found for hook "before_run".
[cordova]  No scripts found for hook "before_prepare".
[cordova]  Checking config.xml for saved platforms that haven't been added to the project
[cordova]  Checking for any plugins added to the project that have not been installed in android platform
[cordova]  No differences found between plugins added to project and installed in android platform. Continuing...
[cordova]  Generating platform-specific config.xml from defaults for android at d:\ionic\event\platforms\android\res\xml\config.xml
[cordova]  Merging project's config.xml into platform-specific android config.xml
[cordova]  Merging and updating files from [www, platforms\android\platform_www] to platforms\android\assets\www
[cordova]    copy  www\assets\css\style.css platforms\android\assets\www\assets\css\style.css (updated file)
[cordova]    copy  www\assets\fonts\Roboto-Regular.ttf platforms\android\assets\www\assets\fonts\Roboto-Regular.ttf (updated file)
[cordova]    copy  www\assets\fonts\Roboto-Thin.ttf platforms\android\assets\www\assets\fonts\Roboto-Thin.ttf (updated file)
[cordova]    copy  www\assets\fonts\ionicons.eot platforms\android\assets\www\assets\fonts\ionicons.eot (updated file)
[cordova]    copy  www\assets\fonts\ionicons.scss platforms\android\assets\www\assets\fonts\ionicons.scss (updated file)
[cordova]    copy  www\assets\fonts\ionicons.svg platforms\android\assets\www\assets\fonts\ionicons.svg (updated file)
[cordova]    copy  www\assets\fonts\ionicons.ttf platforms\android\assets\www\assets\fonts\ionicons.ttf (updated file)
[cordova]    copy  www\assets\fonts\ionicons.woff platforms\android\assets\www\assets\fonts\ionicons.woff (updated file)
[cordova]    copy  www\assets\fonts\ionicons.woff2 platforms\android\assets\www\assets\fonts\ionicons.woff2 (updated file)
[cordova]    copy  www\assets\fonts\noto-sans-bold.ttf platforms\android\assets\www\assets\fonts\noto-sans-bold.ttf (updated file)
[cordova]    copy  www\assets\fonts\noto-sans-bold.woff platforms\android\assets\www\assets\fonts\noto-sans-bold.woff (updated file)
[cordova]    copy  www\assets\fonts\noto-sans-regular.ttf platforms\android\assets\www\assets\fonts\noto-sans-regular.ttf (updated file)
[cordova]    copy  www\assets\fonts\noto-sans-regular.woff platforms\android\assets\www\assets\fonts\noto-sans-regular.woff (updated file)
[cordova]    copy  www\assets\fonts\noto-sans.scss platforms\android\assets\www\assets\fonts\noto-sans.scss (updated file)
[cordova]    copy  www\assets\fonts\roboto-bold.ttf platforms\android\assets\www\assets\fonts\roboto-bold.ttf (updated file)
[cordova]    copy  www\assets\fonts\roboto-bold.woff platforms\android\assets\www\assets\fonts\roboto-bold.woff (updated file)
[cordova]    copy  www\assets\fonts\roboto-bold.woff2 platforms\android\assets\www\assets\fonts\roboto-bold.woff2 (updated file)
[cordova]    copy  www\assets\fonts\roboto-light.ttf platforms\android\assets\www\assets\fonts\roboto-light.ttf (updated file)
[cordova]    copy  www\assets\fonts\roboto-light.woff platforms\android\assets\www\assets\fonts\roboto-light.woff (updated file)
[cordova]    copy  www\assets\fonts\roboto-light.woff2 platforms\android\assets\www\assets\fonts\roboto-light.woff2 (updated file)
[cordova]    copy  www\assets\fonts\roboto-medium.ttf platforms\android\assets\www\assets\fonts\roboto-medium.ttf (updated file)
[cordova]    copy  www\assets\fonts\roboto-medium.woff platforms\android\assets\www\assets\fonts\roboto-medium.woff (updated file)
[cordova]    copy  www\assets\fonts\roboto-medium.woff2 platforms\android\assets\www\assets\fonts\roboto-medium.woff2 (updated file)
[cordova]    copy  www\assets\fonts\roboto-regular.woff platforms\android\assets\www\assets\fonts\roboto-regular.woff (updated file)
[cordova]    copy  www\assets\fonts\roboto-regular.woff2 platforms\android\assets\www\assets\fonts\roboto-regular.woff2 (updated file)
[cordova]    copy  www\assets\fonts\roboto.scss platforms\android\assets\www\assets\fonts\roboto.scss (updated file)
[cordova]    copy  www\assets\icon\favicon.ico platforms\android\assets\www\assets\icon\favicon.ico (updated file)
[cordova]    copy  www\assets\img\6.png platforms\android\assets\www\assets\img\6.png (updated file)
[cordova]    copy  www\assets\img\8.png platforms\android\assets\www\assets\img\8.png (updated file)
[cordova]    copy  www\assets\img\doc.png platforms\android\assets\www\assets\img\doc.png (updated file)
[cordova]    copy  www\assets\img\logo.png platforms\android\assets\www\assets\img\logo.png (updated file)
[cordova]  Error: TypeError: cordovaProject.projectConfig.getFileResources is not a function
[cordova]      at updateFileResources (d:\ionic\event\platforms\android\cordova\lib\prepare.js:416:46)
[cordova]      at d:\ionic\event\platforms\android\cordova\lib\prepare.js:51:9
[cordova]      at _fulfilled (d:\ionic\event\platforms\android\cordova\node_modules\q\q.js:854:54)
[cordova]      at self.promiseDispatch.done (d:\ionic\event\platforms\android\cordova\node_modules\q\q.js:883:30)
[cordova]      at Promise.promise.promiseDispatch (d:\ionic\event\platforms\android\cordova\node_modules\q\q.js:816:13)
[cordova]      at d:\ionic\event\platforms\android\cordova\node_modules\q\q.js:624:44
[cordova]      at runSingle (d:\ionic\event\platforms\android\cordova\node_modules\q\q.js:137:13)
[cordova]      at flush (d:\ionic\event\platforms\android\cordova\node_modules\q\q.js:125:13)
[cordova]      at _combinedTickCallback (internal/process/next_tick.js:131:7)
[cordova]      at process._tickCallback (internal/process/next_tick.js:180:9)
[cordova]    copy  www\assets\img\pdf.png platforms\android\assets\www\assets\img\pdf.png (updated file)
[cordova]    copy  www\assets\img\ppt.png platforms\android\assets\www\assets\img\ppt.png (updated file)
[cordova]    copy  www\build\main.css platforms\android\assets\www\build\main.css (updated file)
[cordova]    copy  www\build\main.css.map platforms\android\assets\www\build\main.css.map (updated file)
[cordova]    copy  www\build\main.js platforms\android\assets\www\build\main.js (updated file)
[cordova]    copy  www\build\main.js.map platforms\android\assets\www\build\main.js.map (updated file)
[cordova]    copy  www\build\polyfills.js platforms\android\assets\www\build\polyfills.js (updated file)
[cordova]    copy  www\build\sw-toolbox.js platforms\android\assets\www\build\sw-toolbox.js (updated file)
[cordova]    copy  www\build\vendor.js platforms\android\assets\www\build\vendor.js (updated file)
[cordova]    copy  www\build\vendor.js.map platforms\android\assets\www\build\vendor.js.map (updated file)
[cordova]    copy  www\index.html platforms\android\assets\www\index.html (updated file)
[cordova]    copy  www\manifest.json platforms\android\assets\www\manifest.json (updated file)
[cordova]    copy  www\service-worker.js platforms\android\assets\www\service-worker.js (updated file)
[cordova]  Wrote out android application name "BTRC Events" to d:\ionic\event\platforms\android\res\values\strings.xml
[cordova]  android-versionCode not found in config.xml. Generating a code based on version in config.xml (18): 180000
[cordova]  Wrote out Android package name "io.ionic.starter" to d:\ionic\event\platforms\android\src\io\ionic\starter\MainActivity.java
[cordova]  Updating icons at platforms\android\res
[cordova]  Updating splash screens at platforms\android\res
[app-scripts] [14:42:08]  lint finished in 5.55 s
[ERROR] An error occurred while running subprocess cordova.

        cordova run android --device --verbose exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
  ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
  ionic:cli-framework:utils:process onBeforeExit handler: running 4 queued functions +0ms
  ionic:cli-utils:lib:serve received error for ionic-app-scripts: { Error: spawn ionic-app-scripts ENOENT at notFoundError (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:11:11) at verifyENOENT (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:46:16) at ChildProcess.cp.emit (C:\Users\ismail\AppData\Roaming\nvm\v8.9.4\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:33:19) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn ionic-app-scripts' } +6s
  ionic:cli-utils:lib:hooks Looking for ionic:serve:after npm script. +27s
  ionic:cli-framework:utils:process error while killing process tree for 6616: { Error: Command failed: taskkill /pid 6616 /T /F ERROR: The process "6616" not found.  at ChildProcess.exithandler (child_process.js:275:12) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) killed: false, code: 128, signal: null, cmd: 'taskkill /pid 6616 /T /F' } +660ms
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)

what is happening? i am not understanding.


#10

Please just run ionic cordova run android and post that output.

What is your ionic info output now?


#11
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) : 6.4.0
   Cordova Platforms     : android 6.4.0, 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
d:\ionic\event>ionic cordova run android
> ionic-app-scripts build --target cordova --platform android
[15:26:52]  ionic-app-scripts 3.1.8
[15:26:52]  build dev started ...
[15:26:52]  clean started ...
[15:26:52]  clean finished in 13 ms
[15:26:52]  copy started ...
[15:26:53]  deeplinks started ...
[15:26:53]  deeplinks finished in 95 ms
[15:26:53]  transpile started ...
[15:27:05]  transpile finished in 12.31 s
[15:27:05]  preprocess started ...
[15:27:05]  preprocess finished in 1 ms
[15:27:05]  webpack started ...
[15:27:06]  copy finished in 13.76 s
[15:27:19]  webpack finished in 13.54 s
[15:27:19]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[15:27:23]  sass finished in 4.14 s
[15:27:23]  postprocess started ...
[15:27:23]  postprocess finished in 59 ms
[15:27:23]  lint started ...
[15:27:23]  build dev finished in 30.93 s
[15:27:41]  lint finished in 18.21 s
> cordova run android
Error: cordovaProject.projectConfig.getFileResources is not a function
[ERROR] An error occurred while running subprocess cordova.

        cordova run android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
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)

#12

You are working with outdated software:

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update


#13
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


d:\ionic\event>npm outdated
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @ionic-native/transfer@4.5.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-08-10T23_05_12_328Z-debug.log

‘npm outdated’ is not working yet. one thing , should i update “Android SDK Tools”?


#14

What does that mean?

That depends on what you want to do. In general Android Studio and Cordova Android tell you which tooling version you need if it is wrong.


#15
d:\ionic\event>npm outdated
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @ionic-native/transfer@4.5.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-08-10T23_05_12_328Z-debug.log

#16

@ionic-native/transfer is not part of a default created project - so this is a problem with your project


#17

Actually, @ionic-native/transfer@4.5.3 does not exist. This Ionic Native plugin was renamed to @ionic-native/file-transfer after version 3.14.0:
https://www.npmjs.com/package/@ionic-native/transfer
https://www.npmjs.com/package/@ionic-native/file-transfer

So the error message is absolutely correct!


#18
d:\ionic\event>npm uninstall @ionic-native/transfer@4.5.3
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @ionic-native/transfer@4.5.3
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'ionic-hello-world'
npm ERR! notarget

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ismail\AppData\Roaming\npm-cache\_logs\2018-08-10T23_32_44_264Z-debug.log

what i’ll do now?


#19

If a version does not exist, you of course can’t uninstall it as it is not installed.

Did you mess around with your package.json file manually?

What is your package.json content now?


#20
{
  "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"
    ]
  }
}