Pet*_*sma 3 azure node.js cypress
I'm using the start-server-and-test package to start a server on my Azure pipeline to run Cypress.
This is the yarn command I use to start everything: yarn cy:build:workspace
"cy:build:workspace": "yarn cy:clean && start-server-and-test start http://localhost:8080 cy:run:workspace"
I'm running NODE_VERSION: "12.10.0" on the Azure env.
"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "d:\a\_temp\ce28689e-eef6-4eeb-bad2-82310f748e1b.cmd""
yarn run v1.22.4
$ yarn cy:clean && start-server-and-test start http://localhost:3000 cy:run:workspace
$ rimraf cypress/reports/*
1: starting server using command "npm run start"
and when url "[ 'http://localhost:3000' ]" is responding with HTTP status code 200
running tests using command "npm run cy:run:workspace"
> @someProjectsbs/suite-packages@0.1.1 start D:\a\1\s
> lerna exec --scope=@someProjectsbs/suite -- yarn start --all-apps
lerna notice cli v3.20.2
lerna info ci enabled
lerna notice filter including "@someProjectsbs/suite"
lerna info filter [ '@someProjectsbs/suite' ]
lerna info Executing command in 1 package: "yarn start --all-apps"
$ cross-env react-app-rewired start --extended-linting --all-apps
[]
[info] [webpackbar] Compiling @someProjectsbs/suite
(node:4672) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
i ?wds?: Project is running at http://192.168.0.100/
i ?wds?: webpack output is served from
i ?wds?: Content not from webpack is served from D:\a\1\s\packages\app\suite\public
i ?wds?: 404s will fallback to /
Starting the development server...
lerna success exec Executed command in 1 package: "yarn start --all-apps"
Error: server closed unexpectedly
at ChildProcess.onClose (D:\a\1\s\node_modules\start-server-and-test\src\index.js:69:14)
at ChildProcess.emit (events.js:209:13)
at ChildProcess.cp.emit (D:\a\1\s\node_modules\start-server-and-test\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
##[error]Cmd.exe exited with code '1'.
Finishing: Run Cypress testsk
Run Code Online (Sandbox Code Playgroud)
Locally I have everything running, any suggestions why the server stops on the Azure environment?
小智 7
检查您的 package.json,如果您使用的是“react-scripts”:“3.4.1”降级到 3.4.0
还要验证此链接以将 start-server-and-test 与纱线一起使用,您需要像字符串一样添加一些纱线命令https://github.com/bahmutov/start-server-and-test#note-for-yarn-users
| 归档时间: |
|
| 查看次数: |
2006 次 |
| 最近记录: |