2
votes

I am going crazy here. I am using PhoneGap 3.0, and I created an app with some plugins. I realized that those plugins that I installed the first time were not enough, so I tried to install another one. The one in questions is the capture plugin and the file transfer plugin. When I try to add the plugins in Terminal, I get this error:

path.js:360
    throw new TypeError('Arguments to path.join must be strings');
          ^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at possiblyFetch (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:49:27)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:298:17
at Array.forEach (native)
at runInstall (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:229:22)
at possiblyFetch (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:64:9)
at Object.installPlugin [as install] (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/install.js:44:5)
at doInstall (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/plugin.js:153:45)

I've tried everything, including creating a completely new app. But no luck.

This is a VERY time sensitive app that I need to do, so any help is GREATLY appreciated.

Thanks!

1
I just tried adding these plugins by doing cordova plugin add org.apache.cordova.file-transfer and cordova plugin add org.apache.cordova.media-capture and did not have any problems. This was with Cordova 3.0.10. Can you try again on empty project? Also, are you on Windows? I have seen similar errors before on Windows when dealing with file names that have odd characters like a space, hyphen, etc....does your project use any of these characters in the name? - MBillau
I'm having the same issue. I'm on mac, and my file/folder names have nothing but standard letter characters. - Drazen Bjelovuk
@AlexBet have u solved this error. i'm also facing same error but not able to resolve. please let me know - ChenSmile
@Immi I did figured it out. It seems that the order in which you load the plugins matters. I guess it is because of dependencies that they have with other plugins. So, if you get this error, see what the plugin's dependencies are, and load those plugs before the one you need. - AlexBet

1 Answers

0
votes

Make sure that you are running the commands from the top level directory of your project. I saw this commit come through recently that exhibits the same error message: https://issues.apache.org/jira/browse/CB-4749