Skip to content

Direct Download version 10.0.0 can't initialize #21999

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

Closed
kercon opened this issue Jun 1, 2022 · 4 comments · Fixed by #22005
Closed

Direct Download version 10.0.0 can't initialize #21999

kercon opened this issue Jun 1, 2022 · 4 comments · Fixed by #22005
Labels
type: bug v10.0.0 🐛 Issue present since 10.0.0

Comments

@kercon
Copy link

kercon commented Jun 1, 2022

Current behavior

The version was downloaded thru Direct Download after initialising the cypress e2e project throws an Error on Loading configFile.

Error: Cannot find module 'cypress'
Require stack:
- D:\Workspaces\Workspaces Cypres\sample3\cypress.config.js
- D:\Install\cypress(1)\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js
- D:\Install\cypress(1)\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\require_async_child.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (D:\Workspaces\Workspaces Cypres\sample3\cypress.config.js:1:26)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at loadFile (D:\Install\cypress(1)\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js:102:14)
    at EventEmitter. (D:\Install\cypress(1)\Cypress\resources\app\node_modules\@packages\server\lib\plugins\child\run_require_async_child.js:136:38)
    at EventEmitter.emit (node:events:390:28)

Desired behavior

Self initialized e2e project should be able to run in Direct Downloaded Installation.

Test code to reproduce

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  e2e: {
    setupNodeEvents(on, config) {
      // implement node event listeners here
    },
  },
});

Cypress Version

10.0.0

Other

No response

@jennifer-shehane
Copy link
Member

Yes, this is a legitimate issue. Thanks for taking the time for report this.

@jennifer-shehane
Copy link
Member

When we detect that Cypress has been opened via direct download, we should scaffold the e2e files differently like below. We need a test for this because there's some belief amongst the team that this should have already been addressed.

module.exports = {
  e2e: {
    setupNodeEvents(on, config) {
      // implement node event listeners here
    },
  },
};

@kercon
Copy link
Author

kercon commented Jun 1, 2022

When we detect that Cypress has been opened via direct download, we should scaffold the e2e files differently like below. We need a test for this because there's some belief amongst the team that this should have already been addressed.

module.exports = {
  e2e: {
    setupNodeEvents(on, config) {
      // implement node event listeners here
    },
  },
};

Yes, I now confirmed if the config file looks like this then direct download loads the config file and can run sample tests.

@jennifer-shehane jennifer-shehane added stage: investigating Someone from Cypress is looking into this v10.0.0 🐛 Issue present since 10.0.0 labels Jun 1, 2022
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: investigating Someone from Cypress is looking into this labels Jun 1, 2022
@mjhenkes mjhenkes added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jun 2, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 2, 2022

Released in 10.0.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.0.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug v10.0.0 🐛 Issue present since 10.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants