When i run my application


#1

When i run application using ionic serve below error is come.

Error: spawn EACCES
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn (child_process.js:502:9)
    at module.exports (/usr/local/lib/node_modules/ionic/node_modules/opn/index.js:74:26)
    at /usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/commands/serve.js:71:13
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:100:62)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

#2

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.


#3

i will tried but same error

  lint started ... 
  build dev finished in 8.98 s 
  watch ready in 9.03 s 
  dev server running: http://localhost:8100/ 

[OK] Development server running!
     Local: http://localhost:8100
     External: http://192.168.0.55:8100
     DevApp: MongoChat@8100 on virani-HP-EliteBook-840-G1

Error: spawn EACCES
    at _errnoException (util.js:1024:11)
    at ChildProcess.spawn (internal/child_process.js:323:11)
    at Object.exports.spawn (child_process.js:502:9)
    at module.exports (/usr/local/lib/node_modules/ionic/node_modules/opn/index.js:74:26)
    at /usr/local/lib/node_modules/ionic/node_modules/@ionic/cli-utils/commands/serve.js:71:13
    at Generator.next (<anonymous>)
    at fulfilled (/usr/local/lib/node_modules/ionic/node_modules/tslib/tslib.js:100:62)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
[17:37:52]  lint finished in 1.87 s

#4

Your paths for ionic should have changed. Are you sure you really did it by the instructions?

What is your ionic info output?


#5

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.9.1
npm               : 5.5.1 
OS                : Linux 4.4

Environment Variables:

ANDROID_HOME : /home/virani/Android/Sdk

Misc:

backend : pro

#6

What does npm return?


#7

seems you are not the root user, so some access issue.
try chown -R <username> /usr/local/lib/
then run ionic serve