question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`npm run test-e2e` fails / CONTRIBUTING.md directions incomplete or incorrect

See original GitHub issue

goal

to submit a minor documentation pull request.

CONTRIBUTING.md asks that I actually use cypress to test the documentation before I submit the pr, so I was attempting to do so as detailed and ran into an issue.

repro steps

  1. fork cypress-documentation
  2. make and commit minor change
  3. npm install
  4. npm run build
  5. npm start
  6. visit localhost:2222 in my browser
  7. stop the running npm start process in preparation to run npm run test-e2e
    • note: successful up until here, doc change looks great when viewed in the browser
  8. npm run test-e2e

what I expected to happen

cypress would start an node server to test against, and then execute cypress (which was installed correctly in step 3 above, mind you) against that node server to test.

what happened instead

[admin@localhost cypress-documentation]$ npm run test-e2e

> cypress-documentation@0.0.0 test-e2e /home/admin/repos/cypress-documentation
> start-server-and-test start http://localhost:2222 cypress:run

starting server using command "npm run start"
and when url "http://localhost:2222" is responding
running tests using command "cypress:run"

> cypress-documentation@0.0.0 start /home/admin/repos/cypress-documentation
> node --stack-size=8192 ./index.js server --port 2222

disabling filter cleanup for environment development
in environment development site url is https://docs.cypress.io
NODE_ENV is: development
INFO  Start processing
Request to: https://www.cypress.io/about timed out. Ignoring this error and proceeding. Waited for 15582ms.
Request to: https://nodejs.org/api/events.html#events_emitter_on_eventname_listener timed out. Ignoring this error and proceeding. Waited for 13176ms.
Request to: http://globtester.com/ timed out. Ignoring this error and proceeding. Waited for 12560ms.
Request to: https://travis-ci.org/ timed out. Ignoring this error and proceeding. Waited for 11737ms.
Request to: http://karma-runner.github.io/ timed out. Ignoring this error and proceeding. Waited for 10964ms.
Request to: https://github.com/mochajs/mochajs.github.io/blob/master/index.md#root-level-hooks timed out. Ignoring this error and proceeding. Waited for 10831ms.
Request to: http://api.jquery.com/eq timed out. Ignoring this error and proceeding. Waited for 15632ms.
Request to: http://api.jquery.com/prevAll timed out. Ignoring this error and proceeding. Waited for 15626ms.
Request to: http://api.jquery.com/last timed out. Ignoring this error and proceeding. Waited for 15629ms.
Request to: http://chaijs.com/ timed out. Ignoring this error and proceeding. Waited for 10962ms.
Request to: http://sinonjs.org/releases/v2.0.0/sandbox/ timed out. Ignoring this error and proceeding. Waited for 10964ms.
Request to: https://on.cypress.io/contributing timed out. Ignoring this error and proceeding. Waited for 12121ms.
Request to: http://mochajs.org/#bdd timed out. Ignoring this error and proceeding. Waited for 13780ms.
Request to: https://github.com/michaelleeallen/mocha-junit-reporter timed out. Ignoring this error and proceeding. Waited for 12122ms.
Request to: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support timed out. Ignoring this error and proceeding. Waited for 12087ms.
Request to: https://github.com/visionmedia/debug timed out. Ignoring this error and proceeding. Waited for 12020ms.
Request to: https://github.com/cypress-io/cypress-webpack-preprocessor timed out. Ignoring this error and proceeding. Waited for 11367ms.
Request to: https://www.w3.org/TR/html5/editing.html#focusable failed.
Error: socket hang up
    at createHangUpError (_http_client.js:336:15)
    at TLSSocket.socketOnEnd (_http_client.js:429:23)
    at TLSSocket.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12)
    at process._tickCallback (internal/process/next_tick.js:178:19)
From previous event:
    at validateExternalUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:115:9)
    at Object.validateAndGetUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:273:12)
    at Object.getUrlProps (/home/admin/repos/cypress-documentation/lib/tags/url.js:14:23)
    at Promise.resolve.then (/home/admin/repos/cypress-documentation/lib/tags/url.js:88:24)
    at runCallback (timers.js:763:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate (timers.js:716:5)
StatusCodeError: 404 - ""
    at new StatusCodeError (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/errors.js:32:15)
    at /home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/plumbing.js:97:41
From previous event:
    at Request.plumbing.init (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/plumbing.js:36:28)
    at Request.RP$initInterceptor [as init] (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/configure/request2.js:41:27)
    at new Request (/home/admin/repos/cypress-documentation/node_modules/request/request.js:128:8)
    at request (/home/admin/repos/cypress-documentation/node_modules/request/index.js:53:10)
    at validateExternalUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:98:10)
    at Object.validateAndGetUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:273:12)
    at Object.getUrlProps (/home/admin/repos/cypress-documentation/lib/tags/url.js:14:23)
    at Promise.resolve.then (/home/admin/repos/cypress-documentation/lib/tags/url.js:88:24)
    at runCallback (timers.js:763:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate (timers.js:716:5)
Request to: https://code.visualstudio.com/ timed out. Ignoring this error and proceeding. Waited for 14286ms.
Request to: https://docs.travis-ci.com/user/uploading-artifacts/ timed out. Ignoring this error and proceeding. Waited for 6997ms.
Request to: https://appveyor.com/ timed out. Ignoring this error and proceeding. Waited for 10187ms.
Request to: https://www.w3.org/TR/html/infrastructure.html#sec-dates timed out. Ignoring this error and proceeding. Waited for 42589ms.
Request to: https://www.docker.com/ timed out. Ignoring this error and proceeding. Waited for 6381ms.
StatusCodeError: 404 - ""
    at new StatusCodeError (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/errors.js:32:15)
    at /home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/plumbing.js:97:41
From previous event:
    at Request.plumbing.init (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/plumbing.js:36:28)
    at Request.RP$initInterceptor [as init] (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/configure/request2.js:41:27)
    at new Request (/home/admin/repos/cypress-documentation/node_modules/request/request.js:128:8)
    at request (/home/admin/repos/cypress-documentation/node_modules/request/index.js:53:10)
    at validateExternalUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:98:10)
    at Object.validateAndGetUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:273:12)
    at Object.getUrlProps (/home/admin/repos/cypress-documentation/lib/tags/url.js:14:23)
    at Promise.resolve.then (/home/admin/repos/cypress-documentation/lib/tags/url.js:88:24)
    at runCallback (timers.js:763:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate (timers.js:716:5)
StatusCodeError: 404 - ""
    at new StatusCodeError (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/errors.js:32:15)
    at /home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/plumbing.js:97:41
From previous event:
    at Request.plumbing.init (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/lib/plumbing.js:36:28)
    at Request.RP$initInterceptor [as init] (/home/admin/repos/cypress-documentation/node_modules/request-promise-core/configure/request2.js:41:27)
    at new Request (/home/admin/repos/cypress-documentation/node_modules/request/request.js:128:8)
    at request (/home/admin/repos/cypress-documentation/node_modules/request/index.js:53:10)
    at validateExternalUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:98:10)
    at Object.validateAndGetUrl (/home/admin/repos/cypress-documentation/lib/url_generator.js:273:12)
    at Object.getUrlProps (/home/admin/repos/cypress-documentation/lib/tags/url.js:14:23)
    at Promise.resolve.then (/home/admin/repos/cypress-documentation/lib/tags/url.js:88:24)
    at runCallback (timers.js:763:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate (timers.js:716:5)
Request to: http://socket.io/ timed out. Ignoring this error and proceeding. Waited for 5003ms.
Request to: https://www.w3.org/TR/html/infrastructure.html#valid-week-string timed out. Ignoring this error and proceeding. Waited for 187408ms.
INFO  Hexo is running at http://localhost:2222. Press Ctrl+C to stop.

> cypress-documentation@0.0.0 cypress:run /home/admin/repos/cypress-documentation
> cypress run

No version of Cypress is installed.

Please reinstall Cypress by running: cypress install
----------

Cypress executable not found at: /home/admin/repos/cypress-documentation/node_modules/cypress/dist/Cypress/Cypress
----------

Platform: linux (Centos - 7.4.1708)
Cypress Version: 2.1.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress-documentation@0.0.0 cypress:run: `cypress run`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cypress-documentation@0.0.0 cypress:run script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/admin/.npm/_logs/2018-04-20T00_06_45_432Z-debug.log
{ Error: Command failed: npm run cypress:run
    at makeError (/home/admin/repos/cypress-documentation/node_modules/start-server-and-test/node_modules/execa/index.js:172:9)
    at Promise.all.then.arr (/home/admin/repos/cypress-documentation/node_modules/start-server-and-test/node_modules/execa/index.js:277:16)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
  code: 1,
  stdout: null,
  stderr: null,
  failed: true,
  signal: null,
  cmd: 'npm run cypress:run',
  timedOut: false,
  killed: false }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress-documentation@0.0.0 test-e2e: `start-server-and-test start http://localhost:2222 cypress:run`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cypress-documentation@0.0.0 test-e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/admin/.npm/_logs/2018-04-20T00_06_45_622Z-debug.log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
joshsleepercommented, Apr 24, 2018

ugh, alright. from scratch, node 9.11.1, and now everything works just fine.

I’m going to chalk it up to bad luck during install or a dumb error on my part I guess.

Sorry for the hassle/noise, but thanks for helping me recognize that I was the problem this time. 😉

PR is submitted as #547, and I’ll go ahead and close this issue that wasn’t really an issue at all!

1reaction
joshsleepercommented, Apr 24, 2018

Right, and that’s all I’m doing too, but given that, which cypress (like you suggested I check) should never actually find cypress, given that it’s not actually on the PATH at all. I’m definitely only running npm run test-e2e, but something in the logs totally made it look like it was attempting to call cypress directly. I’ll chalk that up to a misinterpretation on my end, sorry for the wild goose chase~

THAT SAID…

So I switched to node 8.4.0 like you mentioned, did a git clean -ffxd and git reset --hard HEAD, and gave it one more shot. Worked perfectly.

Cypress is found, tests all pass (as they should for a super minor markdown file edit), and everything is dandy.

Possible conclusion: it really is an issue with the node version I was using!

I’m going to follow the same process as I just did, switch back to the latest node 9.x release, and see if I encounter issues again. If so, I’ll close this issue out and open a new one for some apparent issue with node 9!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CHANGELOG.md - ory/kratos - Sourcegraph
Now, if the Accept header is set to application/json , the login flow will be returned as JSON instead. Accordingly, changes to the...
Read more >
Gatsby Changelog | 5.3.0
When you saw the error "Building static HTML failed for path ..." or the warning "This query took more than 15s to run..."...
Read more >
Delft Students on Software Architecture: DESOSA 2018
start by giving an overview of its stakeholders and the context surrounding Akka. Then an analysis of its architecture and design is given....
Read more >
origin-1.3.0-1.el7 | Build Info
(vsemushi@redhat.com) - README.md: Updates to "What can I run on Origin? ... Description of (run the unit tests) is incorrect in README.md ......
Read more >
Pwning OWASP Juice Shop - GRIET SDC
Part three shows up various ways to contribute to the OWASP Juice Shop ... Unpack the archive and run npm start in unpacked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found