Ionic-cli: hooks/after_prepare/010_add_platform_class.js Error: spawn EACCES

Created on 17 May 2017  路  1Comment  路  Source: ionic-team/ionic-cli

Short description of the problem:

When i did ionic cordova build android , it gives issue

cordova run android
Running command: /home/user/SampleApp/source/hooks/after_prepare/010_add_platform_class.js /home/user/SampleApp/source

Error: spawn EACCES

Which earlier got fixed by:
ionic hooks add i have even tried ionic cordova hooks add

What behavior are you expecting?

Hooks get added and issue gets fixed.

Steps to reproduce:

  1. On a Linux/Mac machine with latest cli
  2. Add a blank project and some plugins which use hooks
  3. Try to build the project

Post the output of ionic info below please
global packages:

@ionic/cli-plugin-proxy : 1.1.2
@ionic/cli-utils        : 1.0.0
Cordova CLI             : 6.5.0 
Ionic CLI               : 3.0.0

local packages:

@ionic/app-scripts              : 1.3.3
@ionic/cli-plugin-cordova       : 1.1.2
@ionic/cli-plugin-ionic-angular : 1.1.2
Ionic Framework                 : ionic-angular 3.0.1

System:

Node       : v7.10.0
OS         : Linux 4.4
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Most helpful comment

The hook doesn't have execute permissions, so you get an EACCES error when Cordova executes it.

Delete hooks/after_prepare/010_add_platform_class.js. That's an Ionic hook that is no longer needed with Ionic Angular.

馃摑 for Ionic 1: chmod +x hooks/after_prepare/010_add_platform_class.js

>All comments

The hook doesn't have execute permissions, so you get an EACCES error when Cordova executes it.

Delete hooks/after_prepare/010_add_platform_class.js. That's an Ionic hook that is no longer needed with Ionic Angular.

馃摑 for Ionic 1: chmod +x hooks/after_prepare/010_add_platform_class.js

Was this page helpful?
0 / 5 - 0 ratings