Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18340] Windows: Error during compilation - TypeError: Cannot read property 'visualstudio' of undefined

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-06-10T05:07:37.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterShannon Hicks
AssigneeChristopher Williams
Created2015-01-07T22:55:09.000+0000
Updated2017-03-16T22:31:52.000+0000

Description

Brand new install, get this error on a brand-new CLI created project (ti create -p windows):
PS C:\Users\Shannon\Desktop\helloworld> ti build -p windows -T wp-emulator -C 8-1-1 --wp-publisher-guid 00000000-0000-10
00-8000-000000000000

C:\Users\Shannon\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:185
        throw e;
              ^
TypeError: Cannot read property 'visualstudio' of undefined
    at MobileWebBuilder.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\mobileweb\cli\hooks\w
indows.js:107:10)
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\index.js:94:5
    at done (C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\node_modules\async\li
b\async.js:129:15)
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\node_modules\async\lib\asyn
c.js:32:16
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\index.js:89:5
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\lib\env.js:111:5
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\node_modules\async\lib\asyn
c.js:254:17
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\node_modules\async\lib\asyn
c.js:151:21
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\node_modules\async\lib\asyn
c.js:251:21
    at C:\ProgramData\Titanium\mobilesdk\win32\3.6.0.v20150107091442\node_modules\windowslib\node_modules\async\lib\asyn
c.js:615:34
PS C:\Users\Shannon\Desktop\helloworld> ti build -p windows -T wp-emulator -C 8-1-1 --wp-publisher-guid 00000000-0000-10
00-8000-000000000000
The only thing that was odd about this install was that I installed everything while running Windows 8.1.... Home? I updated to Windows 8.1 Pro after getting an error about hyper-v not being supported on my edition of Windows. Don't know if it's related. I tried creating a new project with Ti 3.6.0.v20150107091442 on an existing VMWare install, and it's working there... so it's not this version of the SDK creating a bad project.

Comments

  1. Christopher Williams 2015-01-08

    There's something very funky going on here, because as you can see it's referencing MobileWebBuilder, not the WindowsBuilder. Somehow it thinks this is mobileweb?
  2. Christopher Williams 2015-01-08

  3. Sebastián Ramirez 2015-03-19

    I think this is related to this answer: http://developer.appcelerator.com/question/176401/longjohn-bad-argument-error-message#answer-281342 I had the problem described in that question:
       C:\Users\User\AppData\Roaming\npm\node_modules\titanium\node_modules\longjohn\dist\longjohn.js:185
               throw e;
                     ^
       TypeError: Bad argument
           at ChildProcess.spawn (child_process.js:915:24)
           at exports.spawn (child_process.js:715:9)
           at async.parallel.powershell (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\windows.js:386:14)
           at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:524:25
           at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:111:13
           at Array.forEach (native)
           at _each (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:32:24)
           at async.each (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:110:9)
           at _parallel (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:523:20)
           at async.parallel (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:539:9)
       [ERROR] Application Installer abnormal process termination. Process exit value was 8
       
    I was building the Hello World application from the IDE. The solution of replacing the line:
       if (!selectedVisualStudio) return next();
       
    with:
       if (true) return next();
       
    worked for me. I have: Windows 7 64x Titanium Studio, build: 3.4.1.201410281727 Titanium Mobile 3.5.1.GA NodeJS: v0.10.13 Android SDK Manager Revision: 24.1.2 Android SDKs: 5.0.1, 4.1.2, 4.0, 3.0
  4. Kota Iguchi 2015-06-10

    Should be fixed for now.
  5. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source