赛普拉斯测试:停留在等待 http://localhost:3000
Cypress Testing: stuck at wait-on http://localhost:3000
我是 运行 cypress with circleci
workflows:
version: 2.1
test_and_release:
jobs:
- cypress/run:
working_directory: cats-client
start: npm start
wait-on: 'http://localhost:3000'
filters:
tags:
only: /v?\d+\.\d+(\.\d+)?/
branches:
only: /.*/
但是很烂等待命令
====>> Persisting to Workspace (skipped)
Warning: skipping this step: Missing workflow workspace identifiers, this step must be run in the context of a workflow
====>> Start
#!/bin/bash -eo pipefail
npm start
====>> Wait-on http://localhost:3000
#!/bin/bash -eo pipefail
npx wait-on http://localhost:3000
npx: installed 13 in 3.256s
Error:
Too long with no output (exceeded 10m0s): context deadline exceeded
Step timedout
Error: runner failed (exited with 101)
Task failed
Error: task failed
我试图解决这个问题降级 react-scripts
--> 3.4.0
https://github.com/facebook/create-react-app/issues/8688#issuecomment-602678446
但还是一样的问题
问题与反应脚本有关,已通过从 3.4.3
升级到 4.0.3
解决
npm install --save --save-exact react-scripts@4.0.3
参考:https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md
您需要删除 package-lock.json
+ node_modules
文件夹
我是 运行 cypress with circleci
workflows:
version: 2.1
test_and_release:
jobs:
- cypress/run:
working_directory: cats-client
start: npm start
wait-on: 'http://localhost:3000'
filters:
tags:
only: /v?\d+\.\d+(\.\d+)?/
branches:
only: /.*/
但是很烂等待命令
====>> Persisting to Workspace (skipped)
Warning: skipping this step: Missing workflow workspace identifiers, this step must be run in the context of a workflow
====>> Start
#!/bin/bash -eo pipefail
npm start
====>> Wait-on http://localhost:3000
#!/bin/bash -eo pipefail
npx wait-on http://localhost:3000
npx: installed 13 in 3.256s
Error:
Too long with no output (exceeded 10m0s): context deadline exceeded
Step timedout
Error: runner failed (exited with 101)
Task failed
Error: task failed
我试图解决这个问题降级 react-scripts
--> 3.4.0
https://github.com/facebook/create-react-app/issues/8688#issuecomment-602678446
但还是一样的问题
问题与反应脚本有关,已通过从 3.4.3
升级到 4.0.3
npm install --save --save-exact react-scripts@4.0.3
参考:https://github.com/facebook/create-react-app/blob/main/CHANGELOG.md
您需要删除 package-lock.json
+ node_modules
文件夹