-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
THRIFT-5029: Fix Node.js lib entry point #1947
Conversation
Client: js
➕ for this PR |
Same problem. |
PRs welcome. |
I think thrift npm package was published from lib/js folder. It should be published from root folder. package.json in root folder references lib/nodejs folder which contains both nodejs and browser bindings. |
Yeah, I don't believe this change of package.json in |
Also, i created a JIRA ticket 2 months ago. Any progress on this ? Thanks. |
@dcelasun @bforbis or anyone else who has npm maintainer access - can you please fix the state of thrift 0.13.0 as published to npm? It seems to have mistakenly been published using https://github.com/apache/thrift/blob/master/lib/js/package.json when all prior versions were published using https://github.com/apache/thrift/blob/master/package.json, which properly includes and references both the browser and Node.js runtimes in ways that browser and Node.js builds can both understand. I am guessing that this mistaken publishing happened first, prompting this PR, when the real fix would be to republish with the correct package.json at the root. This has broken all Node.js projects using Thrift for the past several months - for instance, the 'hello.js' example included in the npm Readme. But everything Node trying to require 'thrift' after installing it via npm will get the same error regardless:
Can you please republish 0.13.0 immediately to correct this? It would be greatly appreciated by those of us trying to stay up to date with Node.js projects, and would make this project work again for any newbies trying to work with the examples. |
Need this fix! |
tmp fix diy: fork --> rename --> publish to npm
then: rename |
Actually, I think the version 0.13.0 is published with a totally incorrect code base, install 0.12.0 instead. |
In order to reduce the pressure on this issue, I've published a snapshot of the current Apache Thrift trunk with many fixes and improvements to https://www.npmjs.com/package/@biodataanalysis/thrift-trunk Could you please test this to see if it would suite your needs? Any feedback is more than welcome. |
Hi @jfarrell @wadey , could you please take a look at this pr and the issue https://issues.apache.org/jira/browse/THRIFT-5039 ? |
temporary solution: |
The latest published
thrift
version (0.13.0):index.js
at the package rootSo module request throws an exception:
This PR adds missed "main" field to
package.json
.