New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress fails on CI (github action) #103
Comments
Will probably be fixed by #102 |
Closed by #102 |
This got me past that index d01b1b0..a45574c 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -100,7 +100,7 @@ jobs:
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
- useLockFile: false
+ useLockFile: true
- name: 🛠 Setup Database
run: npx prisma migrate reset --force |
ah yep, the first run won't have a lock file until the deps are installed due to #79, so npm ci will fail, personally i think it's fine to have them by default and if someone wants to use a diff package manager, they'll know what to do - especially because we still use npm in the Dockerfile |
@mcansh Could we add some output to the CI about this to avoid confusing users? |
something like? I'm not sure this is better than just having one by default as we still use - name: Check for lockfile
run: |
FILE=package-lock.json
if [ ! -f "$FILE" ]; then
echo "$FILE does not exist. Please run `npm install` before continuing"
exit 1
fi however! just thought about this, we could potentially check for the package manager in github and pass that to Docker for it to know which files to copy and which PM to use 🤔 |
I did "npm install" first. I did have a package-lock.json.
The step that's failing is complaining the lock file is out of sync. I was
able to fix that by adjusting an earlier step and telling it to use the
lock file to check out the dependencies.
I think by explicitly disabling the lock file, it would check out different
versions of packages and then that cuses "npm ci" to complain about them
being out of sync.
…On Fri, Jun 10, 2022, 8:15 AM Logan McAnsh ***@***.***> wrote:
something like? I'm not sure this is better than just having one by
default as we still use npm in the Dockerfile
- name: Check for lockfile
run: | FILE=package-lock.json if [ ! -f "$FILE" ]; then echo "$FILE does not exist. Please run `npm install` before continuing" exit 1 fi
—
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPLB3CE2KAKZNQRYCKLL3VONLYFANCNFSM5YJ22BFQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
something is definitely up, but i don't think that's it as opting out of the lock file uses https://github.com/bahmutov/npm-install/blob/master/index.js#L112 |
interesting, i just created a new app and the cypress job passed https://github.com/mcansh/indie-stack-test/runs/6971217149?check_suite_focus=true |
Closing this issue as no response was provided. |
Have you experienced this bug with the latest version of the template?
Yes
Steps to Reproduce
Create a new project, deploy it with the github action, it will fails as it seems there's a bug with the latests NPM version.
This is the error
npm ERR! 'npm ci' can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with 'npm install' before continuing.
FYI: I fix this issue changing the node version of the Cypress state to
node-version: 16.10.0
(last v7 npm version) and it works.Expected Behavior
Not fail in the cypress step on github action.
Actual Behavior
Cypress step of the build fails.
The text was updated successfully, but these errors were encountered: