I want to query a hive database table from node js. I searched in npm and found two packages - node-hive and thrift-hive, but problems with both as follows
1) node-hive: When I try to run using this, there are many missing dependencies finally didn't get the module 'thrift/transport'
2) thrift-hive: When I try to run using this, query is running forever and not even doing a timeout. I suspect that the libraries they used are for old versions of hive.
The version we are using for hive is 1.1.0-cdh5.4.1.
Is there anything I am missing or is there any proper hive connectors in npm. Thanks in advance
If you want to resolved that dependencies issue then you need to first install thrift module with 0.9.1 version.
So add "thrift":"0.9.1" in your package.json and run npm install.
After that you will not get 'thrift/transport' module dependencies error. Furthermore, even I am curious to know about which npm is best suitable to connect to hive. I am using node version 0.12.7.
Related
Hello I am currently stuck with a task that is given to me. The problem is that I am unable to install dependencies when running npm install which means that I am unable to run the website locally which is my main goal
There are many versions of this question in the internet but I am not really sure what the main cause of this therefore the title of this question
you can view my error logs here
https://www.codepile.net/pile/4qL4NOq0
I have also tried some solutions that I have seen on the internet such as:
reinstalling node
deleting node_modules and package-lock.json and re-npm install (this is when I have installed the node_modules but still unable to run the website locally)
installing grpc globally
The version of grpc that you are installing (1.23.3) does not support the version of Node.js that you are using (16). You will need to use a newer version of grpc (the latest is 1.24.11) or an older version of Node to get that to work.
Please note that the grpc package has been deprecated in favor of the #grpc/grpc-js package. It is recommended that you use that one instead if possible.
I found some code on this site that works well, it does this:
process.stdin.pipe(require('split')()).on('data', function(line) {
...
Curiously no split npm package is installed locally or globally. I search and can't find such a package in official node.js docs.
So I'm curious about where to find information about it. Sure, there's a split npm package that exists, and it does support what my code seems to be doing with it, but... the dots don't connect, because I never had to npm install it!
How do I figure out where the javascript source code for split is on my system? Maybe split has somehow been "included" in the "standard" node.js library and the documentation just needs to catch up?
Additional info:
$ node
> require ('split')
[Function: split]
> process.version
'v6.9.2'
>
I realize now that npm ls shows split exists deep in the dependencies in this project. So that is probably where it is being pulled in from.
The answer to my specific situation is that I was using npm ls --depth=0 and didn't see split in it, but it's a dependency several levels deep inside the project, and require obviously is able to find it that way, and it was simply a coincidence (no manual install of split ended up being necessary)
I am in a bad situation. I need to make some small changes to a complex web application that I did not write myself. However, to begin with I cannot even get the application to build.
The project is using grunt to build the application. But when I run it I get the following error:
Running "ngAnnotate:dist" (ngAnnotate) task
Warning: Cannot create property '$methodName' on boolean 'false' Use --force to continue.
Aborted due to warnings.
Does anyone have a clue what this means and how I can fix it?
Note: If I run grunt --force it does complete building but the result looks all weird and is not functional.
I should probably add that I am pretty unfamiliar with web development, including with grunt.
There was some issue with older ngAnnotate package. grunt-ng-annotate depends on ngAnnotate. So you will have to update the grunt-ng-annotate package.
You can do so using "update grunt-ng-annotate" command in your project directory or by changing version to latest version in package.json then run npm install
Here is the link for the issue: https://github.com/olov/ng-annotate/issues/139
Hope it helps.
I am using cheerio module for web scraping . It require htmlparser2 module , after installing htmlparser2. it gives following error-
Error: Cannot find module 'entities/lib/decode_codepoint.js'
Use this in your terminal:
npm install grunt-contrib-jshint --save-dev
Seen here:
https://www.npmjs.com/package/grunt-contrib-jshint
Below is applicable to Windows environment only, not Linux.
I received the same error when I tried to build jquery from source on Windows. It turns out that jsdom and/or grunt-contrib-jshint (both of which depend on htmlparser2) require gyp and for gyp to work you need a c++ compiler and python. I thought that I had them but turned out, that python need to be version 2.x not version 3.x. If it is 3.x it gives you a proper error on the first run (that I missed) and on subsequent runs you are getting the error in the question above which makes you wonder what's going on.
So I uninstalled python 3.x, installed python 2.x (don't forget make sure that python.exe is in your path), then deleted the node_modules folder in the project root and ran the build again.
This time around it worked. I'm not sure if this solves the OP question, but I hope it helps someone.
I have got a Nodejs app on AppFog and want to connect to a ftp-server with this.
I did install it with npm install ftp using "Ruby Command Prompt"
This is the only code line:
var FTPClient = require('ftp');
Trying to start the app, it throws an error:
Skipping npm-support: npm-shrinkwrap.json is not provided
Which kind of server should I use or what's the problem?
Still doesn't start:
Starting Application 'test007': .
Error: Application [test007] failed to start, logs information below.
====> /logs/staging.log <====
# Logfile created on 2013-03-09 10:37:09 +0000 by logger.rb/25413
Installing dependencies. Node version 0.8.14
Installing ftp#0.2.9 from local path
Installing xregexp#2.0.0 from local path
Installing node#0.0.0 from local path
Installing nodejs#0.0.1 from local path
But no error is shown.
Thanks in advance
The quick fix is to type npm shrinkwrap, which will provide an npm-shrinkwrap file.
A shrinkwrap file fixes the exact versions of your dependencies, and the exact version of their dependencies, and so on. Without it, each usage of npm install could install different versions of the packages -- sometimes, just different bugfix versions (1.4.2 vs 1.4.3), but sometimes much greater differences. There's no guarantee that your code will work with different dependency versions (in fact it is not uncommon to break), so shrinkwrapping is a great idea for any production-level code.
If you want to 'unshrinkwrap', just delete the npm-shrinkwrap.json. You can re-shrinkwrap at any point.