-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error: Cannot find module 'thrift/transport' #3
Comments
I assume you followed the tutorial. You don't need to require thrift transport. The code below worked for me: |
I am also having the same issue - 'Error: Cannot find module 'thrift/transport' |
As I suggested previously, have you tried "not to require thrift/transport" but to use this code instead: |
I was never trying to include thrift/transport, or thrift at first - only node-hive. I want to query some data on Hive (someone else set this up, clearly I am new to Hive here). After running npm install node-hive the console throws an error that thrift is missing... npm install thrift.. - 'Error: Cannot find module 'thrift/transport' To answer your question, yes I used the above code and it didn't solve my issue. I am putting the code in the var .. require(stuff) section of app.js. |
I just remember that I first confused between npm install node-thrift and On Fri, Feb 21, 2014 at 4:48 PM, PB [email protected] wrote:
|
👍 @doxav |
Hi @doxav , I tried and getting same issue require thrift/transport. |
Any update guys? |
Put your thrift dependency to 0.9.1, that should fix the issue. |
@daumann changing the Thrift dependency to "0.9.1" does not fix the problem for me. |
@cmorrow indeed that was the issue for the repo node-thrift-hive, in which the example requires transport at "thrift/lib/thrift/transport" but has the dependency of Thrift on latest. There depending on 0.9.1 fixes the issue there. In this case, notice that the package.json does not have any dependencies but the node_modules are "hardcoded". So when running node-hive.js it depends on this specific folder structure inside node_modules. If you use a global Thrift installation it will fail, as well as if you add thrift to the dependencies and do npm install - because the folder structure is different. |
I am using thrift-hive. i am getting following error Cannot find module 'thrift/lib/thrift/transport' Error: Cannot find module 'thrift/lib/thrift/transport' |
or if you like to keep Thrift on latest:
|
Hi Daumann events.js:141 Error: connect ECONNREFUSED 127.0.0.1:10000 npm ERR! Linux 3.19.0-64-generic Could you please guide me how to resolve this error. |
@daumann |
Hi @daumann Thanks for making this node module and making it available to us, can you please look into this error, I am stuck in this from past 2 days . Thank you so much :) |
Please follow two step to fix the issue in Node.js
Replace code with
|
I changed "transport = thrift.TBufferedTransport()", but got "Cannot read property 'TBufferedTransport' of undefined" |
@Leo555 yes, it will not work as new version hive does not support it, try http://stackoverflow.com/questions/38670740/error-in-connecting-node-js-application-to-hive/39529926#39529926 |
Hello
I'm encountering this problem. At the beginning, it complained thrift was missing. Once I installed thrift, it complains that thrift/transport is missing. What modules should I install to resolve it?
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/gzhao/test/node_modules/node-hive/node-hive.js:2:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (/packages/installed/display_activity_processor-HEAD/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/home/gzhao/test/test.coffee:1:8, :4:10)
at Object. (/home/gzhao/test/test.coffee:1:1, :14:4)
at Module._compile (module.js:456:26)
Thanks.
The text was updated successfully, but these errors were encountered: