Pip Brandy
02/07/2022, 3:37 PMnpm install
, and was able to complete step 1. I'm trying step2, I did "git checkout step2" and step 2 seems to have loaded fine. However, when running "npm test --prefix consumer", I get this error: > CI=true react-scripts test
'CI' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Test failed. See above for more details.
Matt (pactflow.io / pact-js / pact-go)
CI=true
to set the env var inlineMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
cross-env CI=true react-scripts ….
type thinguglyog
Matt (pactflow.io / pact-js / pact-go)
uglyog
uglyog
Pip Brandy
02/07/2022, 10:50 PMPip Brandy
02/07/2022, 10:53 PMuglyog
Pip Brandy
02/07/2022, 10:58 PMPip Brandy
02/07/2022, 10:58 PMPip Brandy
02/07/2022, 10:59 PMPip Brandy
02/07/2022, 11:01 PMPip Brandy
02/07/2022, 11:02 PMPip Brandy
02/07/2022, 11:04 PMPip Brandy
02/07/2022, 11:07 PMMatt (pactflow.io / pact-js / pact-go)
cross-env
to the project’s dependencies?Pip Brandy
02/07/2022, 11:08 PMPip Brandy
02/07/2022, 11:08 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
npm i --save-dev cross-env
and then modify the scripts accordinglyMatt (pactflow.io / pact-js / pact-go)
npm i
run npm ci
Matt (pactflow.io / pact-js / pact-go)
npm i
should work. But as a general rule, use npm ci
Pip Brandy
02/09/2022, 1:27 PMPip Brandy
02/09/2022, 2:10 PMPip Brandy
02/09/2022, 2:10 PMPip Brandy
02/09/2022, 2:10 PMPip Brandy
02/10/2022, 10:02 PMMatt (pactflow.io / pact-js / pact-go)
npm ci
doesn’t work on Windows? what’s the problem?Matt (pactflow.io / pact-js / pact-go)
ci
says “install exactly the versions of the dependencies in the lock file” where as i
says: “install the latest version of every package in the package.json using the semver specified dependency rules”Matt (pactflow.io / pact-js / pact-go)
I wonder if the workshop could be updated to include some instructions for this case?Agreed! If you have cross-env working already, we’d appreciate a PR that adds it in and I’ll get it in so others can benefit?
Pip Brandy
02/11/2022, 3:42 PMPip Brandy
02/11/2022, 3:55 PMPip Brandy
02/11/2022, 3:59 PMPip Brandy
02/11/2022, 4:07 PMPip Brandy
02/11/2022, 4:08 PMPip Brandy
02/11/2022, 6:36 PMPip Brandy
02/11/2022, 6:50 PMPip Brandy
02/11/2022, 7:29 PMPip Brandy
02/11/2022, 7:29 PMPip Brandy
02/11/2022, 7:55 PMPip Brandy
02/11/2022, 7:55 PMPip Brandy
02/11/2022, 7:56 PMPip Brandy
02/11/2022, 11:08 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Let me know if you want me to proceed. And if so, is there a way to do this all at once for each of the Step branches, etc.? Or would I have to do that for each of them?Ah, yes. We’ll need them in all steps. It’s a bit of a pain in the butt. I tend to get a single branch working first, and then cherry-pick each commit into separate branches (see e.g. https://github.com/pact-foundation/pact-workshop-js/blob/master/consumer/scripts/update-branches.sh to do so)
Pip Brandy
02/14/2022, 1:20 PM