cypress-io / cypress-realworld-app

A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.
https://docs.cypress.io
MIT License
5.46k stars 2.19k forks source link

yarn command -> throw new AssertionError(obj); #1422

Closed cetindogu closed 9 months ago

cetindogu commented 11 months ago

node -v ->v18.16.1 yarn version->v1.22.19 OS: Windows 10 22H2 ERROR for "yarn" command:

... warning http-proxy-middleware > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated warning http-proxy-middleware > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning http-proxy-middleware > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning http-proxy-middleware > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated warning jwks-rsa > @types/express-jwt > @types/express-unless@2.0.1: This is a stub types definition. express-unless provides its own type definitions, so you do not need this installed. [3/5] Fetching packages... [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/1937node:assert:125 throw new AssertionError(obj); ^

AssertionError [ERR_ASSERTION]: 23 == 0 at ClientRequest.onConnect (C:\Users\cetin.dogu\source\cypressdeneme\cypress-realworld-app.yarn\releases\yarn-1.22.19.cjs:146337:14) at Object.onceWrapper (node:events:628:26) at ClientRequest.emit (node:events:513:28) at Socket.socketOnData (node:_http_client:582:11) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) { generatedMessage: true, code: 'ERR_ASSERTION', actual: 23, expected: 0, operator: '==' }

MikeMcC399 commented 11 months ago

@cetindogu

A typical log on Windows 11 Pro 22H2 looks like this, so I wonder why you are seeing something quite different on Windows 10:

$ yarn
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " > @material-ui/core@4.12.4" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning " > @material-ui/core@4.12.4" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "@material-ui/core > @material-ui/styles@4.11.5" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@material-ui/core > @material-ui/styles@4.11.5" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "@material-ui/core > @material-ui/system@4.12.2" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@material-ui/core > @material-ui/system@4.12.2" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning "@material-ui/core > @material-ui/utils@4.11.3" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "@material-ui/core > @material-ui/utils@4.11.3" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning " > @material-ui/icons@4.11.3" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning " > @material-ui/icons@4.11.3" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning " > @material-ui/lab@4.0.0-alpha.61" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning " > @material-ui/lab@4.0.0-alpha.61" has incorrect peer dependency "react-dom@^16.8.0 || ^17.0.0".
warning " > @xstate/react@2.0.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
warning "aws-amplify > @aws-amplify/core > react-native-url-polyfill@1.3.0" has unmet peer dependency "react-native@*".
warning "aws-amplify > @aws-amplify/analytics > @aws-sdk/client-firehose > @aws-sdk/middleware-retry > react-native-get-random-values@1.9.0" has unmet peer dependency "react-native@>=0.56".
warning " > react-google-login@5.2.2" has incorrect peer dependency "react@^16 || ^17".
warning " > react-google-login@5.2.2" has incorrect peer dependency "react-dom@^16 || ^17".
warning " > react-infinite-calendar@2.3.1" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning "react-infinite-calendar > react-tiny-virtual-list@2.2.0" has incorrect peer dependency "react@15.x || 16.x".
warning "react-infinite-calendar > react-transition-group@1.2.1" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
warning "react-infinite-calendar > react-transition-group@1.2.1" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0".
warning "react-infinite-calendar > recompose@0.22.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0".
warning " > @babel/plugin-proposal-private-property-in-object@7.21.11" has unmet peer dependency "@babel/core@^7.0.0-0".warning "@babel/plugin-proposal-private-property-in-object > @babel/helper-create-class-features-plugin@7.22.6" has unmet peer dependency "@babel/core@^7.0.0".
warning "@babel/plugin-proposal-private-property-in-object > @babel/plugin-syntax-private-property-in-object@7.14.5" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.17.1" has unmet peer dependency "@babel/core@^7.0.1".
warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.17.1" has unmet peer dependency "@babel/preset-env@^7.0.0".
warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.17.1" has unmet peer dependency "babel-loader@^8.0.2 || ^9".
warning "@cypress/code-coverage > @cypress/webpack-preprocessor@5.17.1" has unmet peer dependency "webpack@^4 || ^5".
warning " > @cypress/webpack-dev-server@1.8.4" has unmet peer dependency "html-webpack-plugin@>=4".
warning " > @cypress/webpack-dev-server@1.8.4" has unmet peer dependency "webpack@>=4".
warning " > @cypress/webpack-dev-server@1.8.4" has unmet peer dependency "webpack-dev-server@>=3.0.0".
warning " > @percy/cypress@2.3.4" has incorrect peer dependency "cypress@^3 || ^4 || ^5 || ^6".
warning "eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-syntax-flow@^7.14.5".
warning "eslint-config-react-app > eslint-plugin-flowtype@8.0.3" has unmet peer dependency "@babel/plugin-transform-react-jsx@^7.14.9".
warning " > express-graphql@0.12.0" has incorrect peer dependency "graphql@^14.7.0 || ^15.3.0".
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
$ husky install && patch-package
husky - Git hooks installed
patch-package 7.0.0
Applying patches...
@material-ui/core@4.12.4 ✔
react-virtualized@9.22.5 ✔
Done in 300.57s.
MikeMcC399 commented 11 months ago

@cetindogu

I also tested on Windows 10 and found no problem.

Perhaps your clone of the repo is not identical to the original develop branch? You could try resetting it or cloning a fresh new copy.

cetindogu commented 11 months ago

Maybe i have coorperate networking problem, thanks for the answer, i will test in a public network

MikeMcC399 commented 11 months ago

@cetindogu

As a cross-check you might like to execute yarn install --force

$ yarn install --force
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[#######################-------------------------------------------------------------------------------------------------] 372/1928

I am only seeing 1928 and it looks like you are seeing 1937, which makes me think that perhaps your copy is not 100% the same as the original.

cetindogu commented 11 months ago

@cetindogu

As a cross-check you might like to execute yarn install --force

$ yarn install --force
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[#######################-------------------------------------------------------------------------------------------------] 372/1928

I am only seeing 1928 and it looks like you are seeing 1937, which makes me think that perhaps your copy is not 100% the same as the original.

İ tried both yarn and npm, no more edit, just cloned then yarn command, so i am sure it is network access problem

MikeMcC399 commented 11 months ago

@cetindogu

The error you see could be caused by network access affecting the successful download of the Cypress binary.

MikeMcC399 commented 11 months ago

@cetindogu

Were you able to resolve your issue?

cetindogu commented 11 months ago

Not yet.

MikeMcC399 commented 9 months ago

@cetindogu

Maybe i have coorperate networking problem, thanks for the answer, i will test in a public network

We didn't hear anything more from you and the problem you reported has not been mentioned by any other users, so I suggest to close this issue.