Jonathan created THRIFT-5170:
--------------------------------

             Summary: [Javascript] Node.js not working at all for Thrift 0.13.0 
as published to npm
                 Key: THRIFT-5170
                 URL: https://issues.apache.org/jira/browse/THRIFT-5170
             Project: Thrift
          Issue Type: Bug
            Reporter: Jonathan


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:

 
{code:java}
> 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)
{code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to