cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.41k stars 3.14k forks source link

Launcher > Developing command `node index.js` fails #29697

Open MikeMcC399 opened 2 weeks ago

MikeMcC399 commented 2 weeks ago

Current behavior

packages/launcher/README > Developing instructions fail with code: 'MODULE_NOT_FOUND'

The instructions are:

To see browsers detected on your machine, just run:

node index.js

The file packages/launcher/index.js does not exist.

Desired behavior

packages/launcher/README > Developing should give working instructions for contributors.

Test code to reproduce

git clone https://github.com/cypress-io/cypress
cd cypress
yarn workspace @packages/launcher install
cd packages/launcher
node index.js

Cypress Version

13.11.0

Node version

v18.17.1 LTS

Operating System

Ubuntu 22.04.4 LTS

Debug Logs

$ node index.js
node:internal/modules/cjs/loader:1080
  throw err;
  ^

Error: Cannot find module '/home/mike/github/cypress-io/cypress/packages/launcher/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.17.1

Other

jennifer-shehane commented 2 weeks ago

Yah I have a feeling a few of these Readmes are out of date. I try to update them when I see something is not right.

MikeMcC399 commented 2 weeks ago

@jennifer-shehane

Yah I have a feeling a few of these Readmes are out of date. I try to update them when I see something is not right.

Unfortunately I don't have the TypeScript skills to work this out on my own. I was hoping I might be able to somehow get closer to fixing the Firefox / Docker / non-root compatibility issue, but I didn't get very far with this. It's not too critical since the workaround is well documented. It would just be nice to sort it out sometime. And to do this, it would be very handy to run the module standalone.