Mac终端中的Cordova安装出错

时间:2014-01-22 12:34:28

标签: android macos cordova phonegap-plugins

我已关注http://docs.phonegap.com/en/3.3.0/guide_cli_index.md.html#The%20Command-Line%20Interface

何时,我输入Mac终端

cordova create hello com.example.hello HelloWorld

错误是 -

path.js:360
    throw new TypeError('Arguments to path.join must be strings');
          ^
ypeError: 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 Object.<anonymous> (/usr/local/lib/node_modules/cordova/src/util.js:25:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)

如果有任何人对错误原因以及如何解决错误有任何想法。请分享。

先谢谢。!!

1 个答案:

答案 0 :(得分:0)

是终于得到了解决方案。要遵循的步骤 -

Install latest version of Node HERE

Open vim .bash_profile in terminal

Type export PATH=${PATH}: <Android SDK Tools Path>

Type source .bash_profile in Terminal

最后关注HERE