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

Hey there,

I’ve just fixed the issue on Windows 7 x64 and I’m glad to share my solution.

The issue:

Error: Command failed: fatal: could not create work tree dir 'C:\Users\532B~1\AppData\Local\Temp\plugman\git\1403892003394'.: No such file or directory

Where 532B~1 is some sort of representation of non-latin username of my current user.
The folder AppData is hidden by default.

The solution:

All you need to do is to create plugman and git folders manually and make sure they are not read-only.

Hope it will help.

Best,
Konstantin

1 Like

Same issue with last version of Cordova, JDK, Apache ANT. Android SDK

How to work without git and plugman ?

Do you have any other advice? I have tried all of the solutions here on this site, and have installed the most recent version of Cordova at lest 5 times , so there is no way that it can possibly be out of date, and I am still receiving the error message below whenever i execute the ionic start myApp command in my Windows Command Prompt.

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

I have followed this installation video several times all the way through, and still no luck.

https://www.youtube.com/watch?v=RNrNIHQ9cWo

As a result I am unable to add platforms and get started building apps using ionic.
Do you have an alternate recommendation for a Development environment that I can use in order to start using Ionic???
I am running windows 7 on a laptop. Not sure if that’s important but i thought i would mention it anyways.

Have you updated the projects?

$ cordova platform update android

I cannot use this command because I cannot even add the android platform to the project.
When I execute ionic platform add android

I recieve the following error message:

ERROR:

Any idea why an error is being thrown here?

Hmm looks what does your .bash_profile look like? Is the android SDK loaded in there?

http://cordova.apache.org/docs/en/3.5.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide

To modify the PATH environment on Windows 7:

Click on the Start menu in the lower-left corner of the desktop, right-click on Computer, then select Properties.

Select Advanced System Settings in the column on the left.

In the resulting dialog box, press Environment Variables.

Select the PATH variable and press Edit.

Append the following to the PATH based on where you installed the SDK, for example:

;C:\Development\adt-bundle\sdk\platform-tools;C:\Development\adt-bundle\sdk\tools

Save the value and close both dialog boxes.

You may also need to enable Java and Ant. Open a command prompt and type java, and also type ant. Append to the PATH whichever of these fails to run:

;%JAVA_HOME%\bin;%ANT_HOME%\bin

Both Java and ant are configured correctly. And I have already added the path environment variables because it was included in the installation video that I posted two comments ago.

Are you able to run android at all

In your terminal can you enter android

Yes I am able to run android and install all of the most recent updates. I am even able to use the android sdk in Eclipse to run an android emulator, so I am fairly confident that it is installed correctly.

I believe that there may be an issue linking the executable cordova file and the android sdk, because the command shell continues to throw an exception every time that I try to use ionic/cordova and android together.

Yes I am able to run android and install all of the most recent updates. I am even able to use the android sdk in Eclipse to run an android emulator, so I am fairly confident that it is installed correctly.

I believe that there may be an issue linking the executable cordova file and the android sdk, because the command shell continues to throw an exception every time that I try to use ionic/cordova and android together.

I do not know your config(不知道你的具体配置).When i mkdir in my home(i use ubuntu 12.04) .It will be mkdir a ‘tmp’ and this dir need root.(当我用inoic生成todo的时候会产生一个tmp目录,这个目录需要root权限操作),and i chmod this ‘tmp’ to 777。It worked(我把这个tmp目录改为777权限的时候,起作用了)。Maybe you can try this.(你可以试试,祝好运。)

I run “ionic platform add android” when such errors occur. I’m sure my path is right, including the ant, jdk, sdk. You know, there is no longer a version of this problem. How can I fix it?

I discovered tat my error was occurring because I didn’t have root administrative privileges. This probably isn’ the case for you.

Can you repost the picture of our error message? My browser is unable to render the image, but I want to attempt to help you, because I was able to find a solution to my problem after several days of banging my head against my computer.

Said the error: "Error: Please install Android target 20 (the Android newest SDK) Make sure you.
have the latest Android tools installed as well. Run “android” from your command
-line to install / update any missing SDKs or tools. "
But my version is the latest android sdk, avd is 4.4w’s. Then I tried to install plugman, but still the same error. T^T

have you run the command

sudo npm install -g android
(if your using windows you can omit the sudo)

This will install the android sdk into your terminal.

and then the command

android

which will allow you to manually update the sdk to the latest edition.

ISSUE- IONIC: 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.

Solution:
After following the above video, install the “git” from here http://git-scm.com/downloads.
Add “git” path (C:\Program Files\Git\bin) to Environment Variables as shown in below image, similarlly how JAVA, SDK, Node.js paths added to PATH.

I have an error: Error: Command failed: Cloning into C:\Users\User\Appdata\Local\Temp\plugman\git\1407…
At childprocess.exithandler (child_process.js:648:15)
at childprocess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Socket. (child_process.js:969:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:465:12)

Unable to add plugins. Cordova too old etc. etc.

Whats wrong?

Hope you guys can help me
Regards
Ibo

Thank you, but I have resolved. But I was using cordova3.5.1. On this site http://cordova.apache.org/announcements/2014/08/04/android-351.html, use this “cordova platform add android@3.5.1 --usenpm”, will be solved. I suspect that the previous version of cordova the bug.

1 Like

Right. I’m using cywin and my location was “'C:\cygwin64\tmp\plugman\git…”.

Whatever directory it’s saying doesn’t exist, just add it. I got my setup working after doing this. Good luck.