Unable to add plugins. Perhaps your version of Cordova is too old


#1

Hello ionicons,

I am trying to workout ionic framework but I could even start it because of the following error:

$ ionic start myApp
Running start task…
Creating Ionic app in folder /Users/praveenjegan/Documents/myApp based on tabs project

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

DOWNLOADING: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
Initializing cordova project.
Fetching plugin “org.apache.cordova.device” via plugin registry
Error: Failed to fetch package information for org.apache.cordova.device
at /usr/local/lib/node_modules/cordova/node_modules/plugman/src/registry/registry.js:32:20
at Request.cb [as _callback] (/usr/local/lib/node_modules/cordova/node_modules/plugman/src/registry/registry.js:251:9)
at self.callback (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/request/index.js:148:22)
at Request.EventEmitter.emit (events.js:117:20)
at ClientRequest.self.clientErrorHandler (/usr/local/lib/node_modules/cordova/node_modules/plugman/node_modules/request/index.js:257:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:415:13)
ERROR: Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again.
Exiting.

Following is working environment,

  1. latest Node.js
  2. latest ionic framework
  3. latest Cordova

I also tried tried to workout sample projects given here but same problem :frowning:

Can someone guide me to start work with IONIC Framework?


Error creating new project
Cordova error while starting an ionic app
Can't create new ionic project after upgrade
#2

I have fixed it myself. Using the below error message,

ERROR: Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again.

move into your project folder myApp and install the cordova plugin directly from their GitHub using the below command

$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git

Now you can add platforms and start to play with IONIC :smiley:

But IONIC TEAM please fix the error and make it easy to play with it.

Thank you,
Praveen Jeganathan.


#3

Thanks for pointing this out. Our CLI doesn’t add cordova to your system when you install it, that is up to the user.


#4

Having the same problem. Used the link above and got the following response.

Current working directory is not a Cordova-based project

Any ideas?

Thanks,
Steve


#5

Are you sure in the directory that you created? Try following the video form our learn site.

http://learn.ionicframework.com/videos/getting-started/


#6

Thanks that worked but still issue with cordova.
My version is 3.4.0-0.1.0

Any idea why cordova not playing nice?

Thanks for your help. Can’t wait to get started building!
-Steve


#7

You can always run $ sudo npm install -g cordova to get the latest version (3.4.1).


#8

I have 3.5.0-0.2.4 cordova but still seeing error plugins will not load? Thinks my version is old.


#9

My only other advise would be to create a new project then move your code over. I’m not too sure what the issue could be.


#10

Just to add to this, had a similar problem on a Windows 8.1 box running latest version of npm and cordova. My problem was related to the Ionic Keyboard plugin trying to download to a directory that does not exist… rather than anything to do with cordova being out of date. As soon as I added that directory tree in my AppData directory it worked fine.

Just in case it helps someone. Regards, Graham

Output from console:

DOWNLOADING: https://github.com/driftyco/ionic-app-base/archive/master.zip

DOWNLOADING: https://github.com/driftyco/ionic-starter-blank/archive/master.zip
Initializing cordova project.
Fetching plugin “org.apache.cordova.device” via plugin registry
Fetching plugin “org.apache.cordova.console” via plugin registry
Fetching plugin “https://github.com/driftyco/ionic-plugins-keyboard” via git clone
Error: Command failed: fatal: could not create work tree dir ‘C:\Users\fowlergz.ADF\AppData\Local\Temp\plugman\git\1400749889006’.: No such file or directory

at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)

ERROR: Unable to add plugins. Perhaps your version of Cordova is too old. Try updating (npm install -g cordova), removing this project folder, and trying again.
Exiting.


#11

“Just in case it helps someone.”

It did. Thanks.


#12

Exact same issue and the same solution worked. Thanks. Hope this will be fixed soon.


#13

I got this error. Is there something wrong with my JAVA_HOME path? Java should be installed correctly…

Error: Failed to run ‘java -version’, make sure your java environment is set up
including JDK and JRE.
Your JAVA_HOME variable is C:\Program Files (x86)\Java\jdk1.7.0_55\bin
Error: Command failed: ‘java’ is not recognized as an internal or external comma
nd,

operable program or batch file.

at C:\Users\sebastiaan\.cordova\lib\android\cordova\3.5.0\bin\lib\check_reqs

.js:62:22
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket. (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
Error: C:\Users\sebastiaan.cordova\lib\android\cordova\3.5.0\bin\create.bat: Co
mmand failed with exit code 8
at ChildProcess.whenDone (C:\Users\sebastiaan\AppData\Roaming\npm\node_modul
es\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
Unable to add platform android. Please see console for more info.


#14

Can someone share the exact path.

I added to appData the following and still no success.
appData/local/Temp/plugman/git

Thanks
Steve


#15

Working on windows 8.1 as well.
Had same issue.
Same error message, only difference was the number at the end of the folder path, very similar though.

Created folder that was missing, re-ran command, and problem was fixed.


#16

Steve,

Problem seems to be very machine depend (and/or intermittent) as I have exactly the same set up on another PC and do not encounter this issue. I recall that I only created the /plugman directory, and then it worked fine.

GF


#17

Thanks Graham.
Can you recall the entire path.
Ex. AppData/plugman

Is this how you set your directory?

Thanks,
Steve


#18

Steve,

The full path is in my original post above.

Regards, Graham


#19

I had the same issue on Mac OS X 10.9 with the latest cordova, et al. The solution was for me to remove the proxy setting for git, as I fortunately didn’t need it.

git config --global --unset http.proxy

To determine if you have a proxy setting for git:

git config --global --list

#20

I had the same issue on windows 8.
can anyone tell me how to slove this issue.

Thanks.