Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5159

Node.js: Runtime ReferenceError in generated code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.13.0
    • Fix Version/s: 0.14.0
    • Component/s: Node.js - Compiler
    • Labels:
      None

      Description

      The code generated by

      thrift.exe --gen js:node,ts,es6,with_ns tutorial.thrift
      

      throws a ReferenceError at runtime.

      Calculator.js:382 Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
          at new e.Client (Calculator.js:382)
          at Object.t.exports (create_client.js:50)
          at Module.<anonymous> (main.js:12)
          at r (bootstrap:19)
          at bootstrap:83
          at webpack-client.js:1
      e.Client @ Calculator.js:382
      t.exports @ create_client.js:50
      (anonymous) @ main.js:12
      r @ bootstrap:19
      (anonymous) @ bootstrap:83
      (anonymous) @ webpack-client.js:1
      

      (The code below create_client.js in the call stack is from my Webpack bundle.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jamlacey James Lacey
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m