microsoft / vsts-cordova-tasks

Streamline CI setup for your Apache Cordova, PhoneGap, Ionic, or Cordova CLI compatible app using a set of useful pre-defined build steps for VS Team Services or TFS
http://go.microsoft.com/fwlink/?LinkID=691188
Other
25 stars 27 forks source link

Cordova Command fail with 'Arguments to path.join must be strings' #54

Closed akamud closed 8 years ago

akamud commented 8 years ago

When I run cordova rm android on my agent (on-premises) I get this error:

path.js:233
throw new TypeError('Arguments to path.join must be strings');
TypeError: Arguments to path.join must be strings
at Object.win32.join (path.js:233:13)
at Object.<anonymous> (C:\agent\tasks\CordovaCommand\1.3.9\lib\node-manager.js:20:114)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\agent\tasks\CordovaCommand\1.3.9\lib\node-setup.js:10:19)
at Module._compile (module.js:460:26)

I noticed it was a problem getting the paths here, so I printed all the paths it is trying to access during the task, and noticed all of them are undefined:

NODE_VERSION_CACHE undefined
APPDATA undefined
HOME undefined

Could this be a bug in the task?

Versions used: CordovaCommand: 1.3.9 Cordova: 5.4.0

BretJohnson commented 8 years ago

@akamud - Can you say how the VSTS agent is deployed here--is it running as a service?

akamud commented 8 years ago

We are running it via command line at the moment.

BretJohnson commented 8 years ago

Thanks. Can you also do echo %APPDATA% from the command prompt (the same one where you run the agent) to verify APPDATA is actually set. Also, what the exact version of Windows that you're on? It seems like this is earlier a configuration problem or a bug with the newest Windows task agent.

BretJohnson commented 8 years ago

@akamud - Also, can you please say what version of the agent is installed. In particular, is it the "Windows" agent or the new "Windows (preview)" agent (the cross platform one). And knowing the version number would be great too.

jicongw commented 8 years ago

@akamud Thanks for reporting this issue. I was investigating this issue and looks like we do not have enough information. Can you please respond with information about running echo %APPDATA% on the agent ? Looks like that may not be defined.

akamud commented 8 years ago

Sorry for taking so long to respond, I was getting this error in a project from another team at my company, unfortunately I was trying to get them to send me more information with no success.

I'm sorry for leaving this with incomplete information.

jicongw commented 8 years ago

@akamud No worries. Let's close this issue. If you found the necessary information, please reopen. Thanks :)