Titanium JIRA Archive
Appcelerator Community (AC)

[AC-240] Alloy compiler failed (cannot find module <project>/undefined)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-11-09T07:07:34.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterConnor Leech
AssigneeMostafizur Rahman
Created2015-07-17T21:42:54.000+0000
Updated2015-11-09T07:07:34.000+0000

Description

I have a titanium mobile project. I am trying to run it from the command line. I do:
$ npm install titanium -g
$ titanium sdk install 3.5.0.GA
$ titanium build --platform=iphone
and I get this error:
[INFO]  Deploy type: development
[INFO]  Building for target: simulator
[INFO]  Building using iOS SDK: 8.2
[INFO]  Building for iOS Simulator: iPhone 4s
[DEBUG] UDID: F0598C60-FAF3-414E-8333-E4124DDC177A
[DEBUG] Simulator type: iphone
[DEBUG] Simulator version: 8.2
[INFO]  Building for device family: universal
[DEBUG] Setting Xcode target to Debug
[DEBUG] Setting Xcode build OS to iphonesimulator8.2
[DEBUG] Xcode installation: /Applications/Xcode.app/Contents/Developer
[DEBUG] iOS WWDR certificate: installed
[INFO]  Minimum iOS version: 7.0
[INFO]  Debugging disabled
[INFO]  Profiler disabled
[INFO]  Forcing rebuild: /Users/connorleech/Proteus/app-ti-pasteboardWriter/build/iphone/build-manifest.json does not exist
[INFO]  Initiating prepare phase
[INFO]  Found Alloy app in /Users/connorleech/Proteus/app-ti-pasteboardWriter/app
[INFO]  Executing Alloy compile: /usr/local/bin/node  compile /Users/connorleech/Proteus/app-ti-pasteboardWriter/app --config platform=ios,version=0,simtype=none,devicefamily=universal,deploytype=development,target=simulator
[DEBUG] module.js:340
[DEBUG]     throw err;
[DEBUG]           ^
[ERROR] : Cannot find module '/Users/connorleech/Proteus/app-ti-pasteboardWriter/undefined'
[DEBUG]     at Function.Module._resolveFilename (module.js:338:15)
[DEBUG]     at Function.Module._load (module.js:280:25)
[DEBUG]     at Function.Module.runMain (module.js:497:10)
[DEBUG]     at startup (node.js:119:16)
[DEBUG]     at node.js:906:3
[ERROR] Alloy compiler failed
I want to run the app in my iOS simulator. Running it on an ipad simulator would be best. What am I doing wrong?

Comments

  1. Rakhi Mitro 2015-09-09

    Hello, Tested this issue. This is not a bug for latest Appcelerator version. Not sure if this is still an issue for you. It doesn't appear to be based on our latest tests. Please follow the steps below and let me know. *Open terminal and run below commands :* 1. Check if Java JDK is installed: *java --version* (if not installed you can download it from [here ](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) ) 2. Ensure that you have Node.JS installed: *node --version* (if not installed then you can download it from [here| https://web.appcelerator.com/product/cli]) 3. Install the Appcelerator CLI: *npm install appcelerator -g* 4. appc setup Login to Studio from terminal using below command and then open your Studio: appc login *If the problem still persist then:* *Uninstall SDK:* appc ti sdk uninstall (SDK version) *Install SDK:* appc ti sdk install latest or appc ti sdk install (SDK version) 5. Create a alloy project 6. Open terminal: Type *appc run -p ios* *Test Result:* Alloy compiler is working as expected and project also running without any error. *Simulator Logs:*
       [INFO]  Alloy compiler completed successfully
       [INFO]  JavaScript files need to be encrypted
       [INFO]  Cleaning old build directory
       [INFO]  Performing full rebuild
       [INFO]  Copying Xcode iOS files
       [INFO]  Creating Xcode project directory: /Users/gsl5/Documents/Appcelerator_Studio_Workspace/ac240alloy/build/i
       phone/ac240alloy.xcodeproj
       [INFO]  Writing Xcode project data file: Titanium.xcodeproj/project.pbxproj
       [INFO]  Writing Xcode module configuration: module.xcconfig
       [INFO]  Updating Xcode project configuration: project.xcconfig
       [INFO]  Forcing rebuild: ApplicationDefaults.m has changed since last build
       [INFO]  Writing application defaults: /Users/gsl5/Documents/Appcelerator_Studio_Workspace/ac240alloy/build/iphon
       e/Classes/ApplicationDefaults.m
       [INFO]  Initiating Xcode pre-compile phase
       [INFO]  Processing JavaScript files
       [INFO]  Encrypting JavaScript files: /Users/gsl5/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/iph
       one/titanium_prep "com.gsl.ac240alloy" "/Users/gsl5/Documents/Appcelerator_Studio_Workspace/ac240alloy/build/iph
       one/assets”
       [INFO]  Processing Titanium namespace resources
       [INFO]  Invoking xcodebuild
       [INFO]  Finished building the application in 2m 3s 187ms
       [INFO]  Launching iOS Simulator
       [INFO]  Project built successfully in 4m 48s 830ms
       
    Thanks

JSON Source