Titanium JIRA Archive
Appcelerator Community (AC)

[AC-288] Employee Directory sample app will not run in Windows

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionFixed
Resolution Date2015-08-20T17:48:44.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
LabelsWindows
ReporterMitch Starnes
AssigneeChristopher Williams
Created2015-08-05T18:05:20.000+0000
Updated2015-08-28T13:51:12.000+0000

Description

At run time, I get this error message: Application Error Error while require(./app) Variable not found: _

Attachments

FileDateSize
AC-288-console.rtf2015-08-08T18:19:45.000+0000304853

Comments

  1. Radamantis Torres-Lechuga 2015-08-06

    [~mitch.starnes@bnsf.com] can you please attach a test case and steps to reproduce the issue? Thanks
  2. Mitch Starnes 2015-08-06

    Start Appcelerator Studio on Windows. Wait for the Dashboard to load. Download the Employee Directory sample project and build it. Then try to run it in any of the Visual Studio 2013 Win Phone 8.1 Emulators. You should get a big red Application Error window that reads: Application Error Error while require(./app) Variable not found: _
  3. Mitch Starnes 2015-08-08

    I cloned this then built and ran it in a Windows Phone emulator to produce the error: https://github.com/appcelerator-se/corporate-directory. Error while require(./app) Variable not found: _
  4. Mitch Starnes 2015-08-08

    Console output is attached.
  5. Mitch Starnes 2015-08-08

    Resources/windows/app.js contains the following: 1: var Alloy = require("alloy"), _ = Alloy._, Backbone = Alloy.Backbone; 2: 3: Alloy.createController("index");
  6. Radamantis Torres-Lechuga 2015-08-10

    [~mitch.starnes@bnsf.com] as today, the Employee Directory sample app has not been ported to run on Windows phones
  7. Mitch Starnes 2015-08-10

    In the github, the project tiapp.xml has the Windows platform box checked and I see platform=windows in some of the tss files. Some of the comments in GitHub say adding support for Windows. Are you sure it's not supposed to be supported?
  8. Bert Grantges 2015-08-10

    Hey [~mstarnes] - We're going to look into this. We definitely made some updates so it should be working with Windows. We'll see if something changed internally that would break it. Thanks!
  9. Mitch Starnes 2015-08-10

    Awesome, Bert! Can't wait to see this app rock Windows! How far out is UWP (Windows 10)? :)
  10. Christopher Williams 2015-08-20

    There were bugs in Windows SDK with how it handled app.js versus other platforms. Ultimately it meant that Alloy.Globals and things like _ weren't available in other JS file in the project unless you explicitly require()'d them. A fix has been pushed to master branch of Windows SDK and is slated for the 5.0.0 GA release. If you'd like to test the fix, you can try an SDK build off master:
        ti sdk install -b master -d
        
    Then you'll need to update the app's tiapp.xml to set the SDK version to the newly installed 5.0.0.x build.

JSON Source