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

Error: Cannot find module 'har-validator' #19104

Closed
web-dragon-smsp opened this issue Nov 25, 2021 · 2 comments
Closed

Error: Cannot find module 'har-validator' #19104

web-dragon-smsp opened this issue Nov 25, 2021 · 2 comments
Labels
topic: installation Issue during installation or downloading Cypress

Comments

@web-dragon-smsp
Copy link

web-dragon-smsp commented Nov 25, 2021

Current behavior

npm install cypress

error /Users/user/Projects/project/node_modules/cypress: Command failed.
Exit code: 1
Command: node index.js --exec install
Arguments:
Directory: /Users/user/Projects/project/node_modules/cypress
Output:
node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module 'har-validator'
Require stack:

  • /Users/user/Projects/project/node_modules/@cypress/request/lib/har.js
  • /Users/user/Projects/project/node_modules/@cypress/request/request.js
  • /Users/user/Projects/project/node_modules/@cypress/request/index.js
  • /Users/user/Projects/project/node_modules/cypress/lib/tasks/download.js
  • /Users/user/Projects/project/node_modules/cypress/lib/tasks/install.js
  • /Users/user/Projects/project/node_modules/cypress/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/Users/user/Projects/project/node_modules/@cypress/request/lib/har.js:5:16)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/Users/user/Projects/project/node_modules/@cypress/request/request.js:23:11)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/user/Projects/project/node_modules/@cypress/request/lib/har.js',
    '/Users/user/Projects/project/node_modules/@cypress/request/request.js',
    '/Users/user/Projects/project/node_modules/@cypress/request/index.js',
    '/Users/user/Projects/project/node_modules/cypress/lib/tasks/download.js',
    '/Users/user/Projects/project/node_modules/cypress/lib/tasks/install.js',
    '/Users/user/Projects/project/node_modules/cypress/index.js'
    ]

Debug logs

No response

Cypress Version

8.3.0

Package Manager

npm

Operating system

Mac

Other

No response

@web-dragon-smsp web-dragon-smsp added the topic: installation Issue during installation or downloading Cypress label Nov 25, 2021
@manusanchev
Copy link

manusanchev commented Nov 25, 2021

Duplicate of #19102

@chrisbreiding
Copy link
Contributor

The code for this is done in cypress-io/cypress#19099, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: installation Issue during installation or downloading Cypress
Projects
None yet
Development

No branches or pull requests

3 participants