cypress-io / cypress-realworld-app

A payment application to demonstrate real-world usage of Cypress testing methods, patterns, and workflows.

Home Page:https://docs.cypress.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to start application

raidanish opened this issue · comments

PS C:\Users\user1\Downloads\cypress-realworld-app-develop> npm run dev

cypress-realworld-app@1.0.0 predev C:\Users\rai.danish\Downloads\cypress-realworld-app-develop
yarn db:seed:dev

yarn run v1.22.19
$ yarn predev:cognito:ci
$ yarn copy:mock:awsexports && yarn copy:mock:awsexportses5
$ ncp scripts/mock-aws-exports.js src/aws-exports.js
$ ncp scripts/mock-aws-exports-es5.js aws-exports-es5.js
$ ncp ./data/database-seed.json ./data/database.json
Done in 4.33s.

cypress-realworld-app@1.0.0 dev C:\Users\rai.danish\Downloads\cypress-realworld-app-develop
cross-env NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch

yarn run v1.22.19
yarn run v1.22.19
$ react-scripts -r @cypress/instrument-cra start
$ nodemon --exec yarn tsnode --watch 'backend' backend/app.ts
[start:api:watch] [nodemon] 2.0.15
[start:api:watch] [nodemon] to restart at any time, enter rs
[start:api:watch] [nodemon] watching path(s): 'backend'
[start:api:watch] [nodemon] watching extensions: ts,json
[start:api:watch] [nodemon] starting yarn tsnode backend/app.ts
$ nyc --silent ts-node -P tsconfig.tsnode.json backend/app.ts
[start:react] [HPM] Proxy created: [ '/login', '/callback', '/logout', '/checkAuth', 'graphql' ] -> http://localhost:undefined
[start:react] [HPM] Subscribed to http-proxy events: [ 'error', 'close' ]
[start:react] i 「wds」: Project is running at http://192.168.100.169/
[start:react] i 「wds」: webpack output is served from
[start:react] i 「wds」: Content not from webpack is served from C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\public
[start:react] i 「wds」: 404s will fallback to /
[start:react] Starting the development server...
[start:react]
[start:react] Error: error:0308010C:digital envelope routines::unsupported
[start:react] at new Hash (node:internal/crypto/hash:71:19)
[start:react] at Object.createHash (node:crypto:133:10)
[start:react] at module.exports (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\util\createHash.js:135:53)
[start:react] at NormalModule._initBuildHash (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:417:16)
[start:react] at handleParseError (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:471:10)
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:503:5
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:358:12
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\loader-runner\lib\LoaderRunner.js:373:3
[start:react] at iterateNormalLoaders (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
[start:react] at iterateNormalLoaders (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
[start:react] C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\react-scripts\scripts\start.js:19
[start:react] throw err;
[start:react] ^
[start:react]
[start:react] Error: error:0308010C:digital envelope routines::unsupported
[start:react] at new Hash (node:internal/crypto/hash:71:19)
[start:react] at Object.createHash (node:crypto:133:10)
[start:react] at module.exports (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\util\createHash.js:135:53)
[start:react] at NormalModule._initBuildHash (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:417:16)
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:452:10
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\webpack\lib\NormalModule.js:323:13
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\loader-runner\lib\LoaderRunner.js:367:11
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\loader-runner\lib\LoaderRunner.js:233:18
[start:react] at context.callback (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
[start:react] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\babel-loader\lib\index.js:59:103 {
[start:react] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[start:react] library: 'digital envelope routines',
[start:react] reason: 'unsupported',
[start:react] code: 'ERR_OSSL_EVP_UNSUPPORTED'
[start:react] }
[start:react]
[start:react] Node.js v18.12.0
error Command failed with exit code 1.
[start:react] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[start:react] yarn run start:react exited with code 1
[start:api:watch] C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\ts-node\src\index.ts:820
[start:api:watch] return new TSError(diagnosticText, diagnosticCodes);
[start:api:watch] ^
[start:api:watch] TSError: ⨯ Unable to compile TypeScript:
[start:api:watch] backend/helpers.ts(92,50): error TS2349: This expression is not callable.
[start:api:watch] Type 'typeof import("C:/Users/rai.danish/Downloads/cypress-realworld-app-develop/node_modules/express-unless/dist/index")' has no call signatures.
[start:api:watch] backend/helpers.ts(93,57): error TS2349: This expression is not callable.
[start:api:watch] Type 'typeof import("C:/Users/rai.danish/Downloads/cypress-realworld-app-develop/node_modules/express-unless/dist/index")' has no call signatures.
[start:api:watch] backend/helpers.ts(94,52): error TS2349: This expression is not callable.
[start:api:watch] Type 'typeof import("C:/Users/rai.danish/Downloads/cypress-realworld-app-develop/node_modules/express-unless/dist/index")' has no call signatures.
[start:api:watch]
[start:api:watch] at createTSError (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\ts-node\src\index.ts:820:12)
[start:api:watch] at reportTSError (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\ts-node\src\index.ts:824:19)
[start:api:watch] at getOutput (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\ts-node\src\index.ts:1014:36)
[start:api:watch] at Object.compile (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\ts-node\src\index.ts:1322:43)
[start:api:watch] at Module.m._compile (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\ts-node\src\index.ts:1454:30)
[start:api:watch] at module.exports (C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\default-require-extensions\js.js:7:9)
[start:api:watch] at C:\Users\rai.danish\Downloads\cypress-realworld-app-develop\node_modules\append-transform\index.js:64:4
[sta

I was facing the same issue when I was trying to run the app using node v18. Then I switched to node v16. The app runs without any problem. Try to change the node version, I hope it will be solved.

If you enforce usage of openssl legacy provider it will run:

export NODE_OPTIONS="--openssl-legacy-provider"

@wingsuitist

If you enforce usage of openssl legacy provider it will run:

export NODE_OPTIONS="--openssl-legacy-provider"

You can run it manually under Node.js 18 with the above environment variable, however the README: Prerequisites does specifically point to the .node-version which contains 16.16.0 as compatible Node.js version.

It would be quite complicated to try to add this environment variable to all the automated scripts which would need it.

The workaround is needed due to the old version 4.0.3 of react-scripts.

The repo would need extensive rework to run completely under Node.js 18. There are also a lot of warnings output when installing even under Node.js 16.16.0. See #1329

commented

Closing this issue as we do not have full support int his repo for Node 18 as of now.