Skip to content
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

Unable to run the tests on master branch #158

Closed
nelsonic opened this issue Nov 16, 2014 · 4 comments
Closed

Unable to run the tests on master branch #158

nelsonic opened this issue Nov 16, 2014 · 4 comments

Comments

@nelsonic
Copy link

Trying to run grunt test or grunt test_unit on Ubuntu (using Vagrant) - all dependencies installed - I get the error:

installing es
1.4_nightly installed

Running "run:es_1.4" (run) task
>> es_1.4 started
/bin/sh: 1: ./.snapshots/1.4_nightly/bin/elasticsearch: not found

Running "mochacov:integration_1.4" (mochacov) task

  ․

  0 passing (15s)
  1 failing

  1) integration "before all" hook:
     Error: unable to establish contact with ES
      at /vagrant/elasticsearch-js/test/integration/yaml_suite/client_manager.js:42:16
      at respond (/vagrant/elasticsearch-js/src/lib/transport.js:254:9)
      at sendReqWithConnection (/vagrant/elasticsearch-js/src/lib/transport.js:174:7)
      at next (/vagrant/elasticsearch-js/src/lib/connection_pool.js:213:7)
      at process._tickCallback (node.js:419:13)



Warning:  Use --force to continue.

Aborted due to warnings.

Screenshot:

unable-to-run-tests

@spalger
Copy link
Contributor

spalger commented Nov 16, 2014

Sounds like you need to clear out the .snapshots directory in the root of the project. The run:install_es_1.4 task does a pretty rudimentary install of elasticsearch which appears to have failed (or was canceled), but the directory still exists and is preventing 1.4 from being reinstalled.

I should really switch to using libesvm but haven't had the time.

@nelsonic
Copy link
Author

@spenceralger thanks for getting back to me. on your advice, in my Vagrant VM I did:

rm -rf elasticsearch-js
git clone https://github.com/elasticsearch/elasticsearch-js.git && cd elasticsearch-js
npm install 

Get a few warnings:

npm WARN package.json [email protected] No repository field.
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt requires async@'~0.1.22' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/async,
npm WARN unmet dependency which is version 0.8.0
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt requires coffee-script@'~1.3.3' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/coffee-script,
npm WARN unmet dependency which is version 1.8.0
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt requires glob@'~3.1.21' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/glob,
npm WARN unmet dependency which is version 3.2.11
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt requires js-yaml@'~2.0.5' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/js-yaml,
npm WARN unmet dependency which is version 2.1.3
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/mocha requires glob@'3.2.3' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/glob,
npm WARN unmet dependency which is version 3.2.11
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/browserify/node_modules/umd/node_modules/uglify-js requires async@'~0.2.6' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/async,
npm WARN unmet dependency which is version 0.8.0
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/browserify/node_modules/umd/node_modules/uglify-js requires optimist@'~0.3.5' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/browserify/node_modules/optimist,
npm WARN unmet dependency which is version 0.5.2
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt-contrib-uglify/node_modules/uglify-js requires async@'~0.2.6' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/async,
npm WARN unmet dependency which is version 0.8.0
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt-contrib-uglify/node_modules/uglify-js requires optimist@'~0.3.5' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/optimist,
npm WARN unmet dependency which is version 0.6.1
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt-contrib-watch/node_modules/gaze/node_modules/globule requires glob@'~3.1.21' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/glob,
npm WARN unmet dependency which is version 3.2.11
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt-mocha-cov/node_modules/mocha requires glob@'3.2.3' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/glob,
npm WARN unmet dependency which is version 3.2.11
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/grunt-prompt/node_modules/inquirer requires async@'~0.2.8' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/async,
npm WARN unmet dependency which is version 0.8.0
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/load-grunt-tasks/node_modules/globule requires glob@'~3.1.21' but will load
npm WARN unmet dependency /vagrant/elasticsearch-js/node_modules/glob,
npm WARN unmet dependency which is version 3.2.11
[email protected] node_modules/grunt-contrib-jshint

Then when I try to run npm test I get
Error: Cannot find module 'dateformat'
(Lots _missing dependencies_ - not listed in dependencies or devDependencies in package.json)
So I tried to install all of these:

sudo npm install minimatch js-yaml glob async optimist browserify coffee-script dateformat grunt-contrib-jshint

I get the following error:

npm ERR! peerinvalid The package browserify does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants browserify@>=2.35 < 3.0.0

Looks like the dependencies are out of date...
Dependencies
devDependency Status

Should I create a separate issue to update all the dependencies & devDependencies?

@spalger
Copy link
Contributor

spalger commented Nov 17, 2014

Hmm, if updating all the packages works for you then please create a ticket. The current version builds fine on my box and on travis. Seems like something else if wrong here.

@delvedor
Copy link
Member

Hi! I'm closing this due to inactivity, if it is still an issue, please feel free to reopen! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants