Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28200] Angular: Project created from template fails build with type errors

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2020-10-29T12:33:50.000+0000
Affected Version/sn/a
Fix Version/sRelease 9.3.0, Release 9.2.2
ComponentsTooling
Labelsn/a
ReporterJan Vennemann
AssigneeJan Vennemann
Created2020-10-15T18:08:14.000+0000
Updated2020-10-29T12:33:50.000+0000

Description

*Steps to reproduce the behavior*

Create new Angular project with appc new --ng

Build project

*Actual behavior* Build fails with the following error:
[INFO]   WEBPACK   ERROR  Failed to compile with 1 errors8:05:23 PM
[INFO]   WEBPACK  
[INFO]   WEBPACK   error  
[INFO]   WEBPACK  [INFO]   WEBPACK  test-angular/node_modules/zone.js/dist/zone.js.d.ts:600:13 - error TS2403: Subsequent variable declar
ations must have the same type.  Variable 'global' must be of type 'Global', but here has type 'Global'.
[INFO]   WEBPACK  
[INFO]   WEBPACK  600 declare var global: NodeJS.Global;
[INFO]   WEBPACK                  ~~~~~~
[INFO]   WEBPACK  
[INFO]   WEBPACK    test-angular/node_modules/@types/titanium/globals.d.ts:57:13
[INFO]   WEBPACK      57 declare var global: Titanium.Global;
[INFO]   WEBPACK                     ~~~~~~
[INFO]   WEBPACK      'global' was also declared here.
*Expected behavior* Build without error

Comments

  1. Sohail Saddique 2020-10-21

    FR: *Failed* using SDK v9.3.0.v20201019143537 [~jvennemann] *Test Environment* SDK Ver: v9.3.0.v20201019143537 OS Ver: 10.15.6 Appc NPM: 5.0.0 Appc CLI: 8.1.1 Node Ver: 12.19.0 NPM Ver: 6.13.6 Java Ver: 1.8.0_162 The following error is seen:
       [INFO]   WEBPACK   ERROR  Failed to compile with 1 errors2:16:52 PM
       [INFO]   WEBPACK  
       [INFO]   WEBPACK   error  
       [INFO]   WEBPACK  
       [INFO]   WEBPACK  ../TIMOB-28200-4/node_modules/zone.js/zone.d.ts:600:21 - error TS2503: Cannot find namespace 'NodeJS'.
       [INFO]   WEBPACK  
       [INFO]   WEBPACK  600 declare var global: NodeJS.Global;
       
  2. Samir Mohammed 2020-10-21

    Getting a failure on Windows too with the following error:
       INFO] WEBPACK ERROR Failed to compile with 1 errors1:55:19 PM
       [INFO] WEBPACK
       [INFO] WEBPACK error
       [INFO] WEBPACK
       [INFO] WEBPACK ../../../../Desktop/anewan/node_modules/zone.js/zone.d.ts:600:21 - error TS2503: Cannot find namespace 'NodeJS'.
       [INFO] WEBPACK
       [INFO] WEBPACK 600 declare var global: NodeJS.Global;
       [INFO] WEBPACK ~~~~~~
       [ERROR] Error: Webpack compilation failed.
       at WebpackService.handler (C:\ProgramData\Titanium\mobilesdk\win32\9.2.2.v20201015143748\cli\lib\webpack\service.js:240:20)
       at WebpackService.emit (events.js:311:20)
       at Subscription.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\9.2.2.v20201015143748\cli\lib\webpack\service.js:287:10)
       at Subscription.emit (events.js:311:20)
       at EventEmitter.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\9.2.2.v20201015143748\cli\lib\webpack\appcd.js:50:19)
       at EventEmitter.emit (events.js:311:20)
       at Object.handler (C:\Users\APPC\.appcelerator\install\8.1.1\package\node_modules\appcd-client\dist\client.js:313:19)
       at WebSocket.<anonymous> (C:\Users\APPC\.appcelerator\install\8.1.1\package\node_modules\appcd-client\dist\client.js:126:31)
       at WebSocket.emit (events.js:311:20)
       at Receiver.receiverOnMessage (C:\Users\APPC\.appcelerator\install\8.1.1\package\node_modules\appcd-client\node_modules\ws\lib\websocket.js:800:20)
       
    *Test Environment*
         Name                        = Microsoft Windows 10 Pro
         Version                     = 10.0.18363.  All Rights Reserved.
         Architecture                = 64bit
         # CPUs                      = 16
         Memory                      = 63.9GB
       
       Node.js
         Node.js Version             = 12.16.1
         npm Version                 = 6.13.4
       
       Appcelerator CLI
         Installer                   = 5.0.0
         Core Package                = 8.1.1
       
       Titanium CLI
         CLI Version                 = 5.2.5
         node-appc Version           = 1.1.1
       
       Java Development Kit
         Version                     = 10.0.1_10
       
       NDK Version                 = 20.1.5948944
       
  3. Jan Vennemann 2020-10-21

    PR: https://github.com/appcelerator/titanium_mobile/pull/12199
  4. Samir Mohammed 2020-10-22

    FR Passed, waiting on Jenkins build.
  5. Samir Mohammed 2020-10-29

    *Closing ticket*. Fix verified in SDK version 9.3.0.v20201028071437, and 9.2.2.v20201028132228. *Test and other information can be found at:* https://github.com/appcelerator/titanium_mobile/pull/12199

JSON Source