Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1812] iOS: CLI: module.js :340 and throw err cannot find module.

GitHub Issuen/a
Resolution Date2013-06-28T18:30:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Reportervenkatesh guttal
AssigneeDaniel Sefton


I ran the Titanium command using CLI, and I got the following error:
[DEBUG] Detecting plugins in /Users/amsadmin/jenkins/workspace/CICA_eAgent/CICA_eAgent/plugins
[DEBUG] Detected plugin: ti.alloy @ /Users/amsadmin/jenkins/workspace/CICA_eAgent/CICA_eAgent/plugins/ti.alloy
[DEBUG] Looking for Titanium plugin id: ti.alloy version: 1.0
[DEBUG] Loaded plugin hooks:
[DEBUG] /Users/amsadmin/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130619101604/cli/hooks/plugins.js
[DEBUG] /Users/amsadmin/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130619101604/iphone/cli/hooks/install.js
[DEBUG] /Users/amsadmin/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130619101604/iphone/cli/hooks/package.js
[DEBUG] /Users/amsadmin/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130619101604/iphone/cli/hooks/run.js
[DEBUG] /Users/amsadmin/jenkins/workspace/CICA_eAgent/CICA_eAgent/plugins/ti.alloy/hooks/alloy.js
[DEBUG] Titanium iOS SDK directory: /Users/amsadmin/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130619101604/iphone
[INFO] Deploy type: development
[INFO] Building for target: simulator
[INFO] Building using iOS SDK: 6.1
[INFO] Building for iOS iPad Simulator: 6.1
[INFO] Building for device family: ipad
[DEBUG] Setting Xcode target to Debug
[DEBUG] Setting Xcode build OS to iphonesimulator6.1
[DEBUG] Xcode installation: /Applications/Xcode.app/Contents/Developer
[DEBUG] iOS WWDR certificate: installed
[INFO] Minimum iOS version: 5.0
[INFO] Debugging disabled
[INFO] Profiler disabled
[INFO] Initiating prepare phase
[DEBUG] Building for the following architectures: armv7 armv7s i386
[INFO] Forcing rebuild: /Users/amsadmin/jenkins/workspace/CICA_eAgent/CICA_eAgent/build/iphone/build-manifest.json does not exist
[INFO] Found Alloy app in /Users/amsadmin/jenkins/workspace/CICA_eAgent/CICA_eAgent/app
[INFO] Executing Alloy compile: /Users/amsadmin/local/node/bin/node compile /Users/amsadmin/jenkins/workspace/CICA_eAgent/CICA_eAgent/app --config platform=ios,version=0,simtype=none,devicefamily=ipad,deploytype=development
[ERROR] module.js:340
[ERROR] throw err;
[ERROR] Error: Cannot find module '/Users/amsadmin/undefined'
[ERROR] at Function.Module._resolveFilename (module.js:338:15)
[ERROR] at Function.Module._load (module.js:280:25)
[ERROR] at Function.Module.runMain (module.js:497:10)
[ERROR] at startup (node.js:119:16)
[ERROR] at node.js:901:3
[ERROR] Alloy compiler failed


  1. Daniel Sefton 2013-06-24

    Hi venkatesh, You'll need to install node.js 0.8.x. You're using 0.10, which isn't properly supported yet.
  2. venkatesh guttal 2013-06-26

    Hi, I tried for V0.8.0 but getting the same problem. Waiting for your reply, Regards, Venkatesh
  3. venkatesh guttal 2013-06-28

  4. venkatesh guttal 2013-06-28

    Hi, The above problem is solved, need to update alloy by using following command sudo npm install -g alloy Regards, Venkatesh
  5. venkatesh guttal 2013-06-28

    Hi, The above problem is resolved by updating alloy using following cmd sudo npm install -g alloy Regards, Venkatesh Guttal
  6. Daniel Sefton 2013-06-28

    Thanks for the update. Closing as fixed.

JSON Source