在我的 linux(ubuntu 12.04)机器上构建 phonegap android 应用程序时出现错误。我已经安装了 nodejs,将 JAVA_HOME、ANT_HOME、ANDROID_HOME vars 和 $JAVA_HOME/bin、$ANT_HOME/bin、$ANDROID_HOME/tools、$ANDROID_HOME/platform-tools 设置为路径。当我运行命令时phonegap local build android
,我收到以下错误:
ME@My-PC:/dos/PhoneGap/HelloWorld$ phonegap local run android
[phonegap] compiling Android...
[error] An error occurred while building the android project.
module.js:340
throw err;
^
Error: Cannot find module 'shelljs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/dos/PhoneGap/HelloWorld/platforms/android/cordova/lib/build.js:22:15)
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)
感谢您的帮助