`npm run test-e2e` fails / CONTRIBUTING.md directions incomplete or incorrect
See original GitHub issuegoal
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
- fork cypress-documentation
- make and commit minor change
npm install
npm run build
npm start
- visit
localhost:2222
in my browser - stop the running
npm start
process in preparation to runnpm run test-e2e
- note: successful up until here, doc change looks great when viewed in the browser
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:
- Created 5 years ago
- Comments:14 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
Right, and that’s all I’m doing too, but given that,
which cypress
(like you suggested I check) should never actually findcypress
, given that it’s not actually on thePATH
at all. I’m definitely only runningnpm run test-e2e
, but something in the logs totally made it look like it was attempting to callcypress
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 agit clean -ffxd
andgit 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 withnode 9
!