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

Node.js not working at all for Thrift 0.13.0 as published to npm

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • None
    • None
    • Node.js - Library
    • None

    Description

      The version of the Javascript runtime published to npm at https://www.npmjs.com/package/thrift has been broken since the last publish to version 0.13.0, 5 months ago. It was published from the wrong root folder, with the wrong package.json, so it only pulled in the browser js runtime instead of both the browser and Node.js runtimes.

      The folder/package.json published as 0.13.0:

      https://github.com/apache/thrift/blob/master/lib/js/package.json

      What `thrift` has been published with for every version prior:

      https://github.com/apache/thrift/blob/master/package.json

      This has broken the package for all Node.js consumers trying to upgrade. This can be verified by installing it and trying to run the Node.js example in the package Readme:

       

      > node hello.js 
      internal/modules/cjs/loader.js:584
       throw err;
       ^
      Error: Cannot find module 'thrift'
       at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
       at Function.Module._load (internal/modules/cjs/loader.js:508:25)
       at Module.require (internal/modules/cjs/loader.js:637:17)
       at require (internal/modules/cjs/helpers.js:22:18)
       at Object.<anonymous> (/home/jrajav/Development/thrift-test/hello.js:2:14)
       at Module._compile (internal/modules/cjs/loader.js:701:30)
       at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
       at Module.load (internal/modules/cjs/loader.js:600:32)
       at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
       at Function.Module._load (internal/modules/cjs/loader.js:531:3)
      

       

      Attachments

        Issue Links

          Activity

            People

              emmenlau Mario Emmenlauer
              jrajav Jonathan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: