-
Notifications
You must be signed in to change notification settings - Fork 351
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
Error: Cannot find module 'cypress': fail to run action on pnpm workspace. #1054
Comments
The action does not have any special code to handle pnpm workspaces. This is only in place for Yarn workspaces. You can try adding the - name: Run test
uses: cypress-io/github-action@v6
with:
install: false
project: ./packages/test/
browser: chrome You are already installing dependencies separately using - name: Install dependencies
run: |
pnpm i --frozen-lockfile Also, I wouldn't expect there to be a If that doesn't work, then it would be helpful if you could share a complete repository setup (minimum reproducible example) online. If you cannot do that then I can share an example pnpm workspace project which works, however that is not identical to your structure. Let us know how you progress! |
Hi @MikeMcC399, thanks for your quick answer. Run cypress-io/github-action@v6
Skipping install because install parameter is false
Error: Cannot find module 'cypress'
Require stack:
- /home/runner/work/_actions/cypress-io/github-action/v6/dist/index.js
There isn't one in fact, I just have the one in the main folder. Thanks! |
Many thanks for your repo. I can see your issues directly now. The workflow has two problems:
To resolve:
To cache the Cypress binary cache you can add the following before the - name: Set up Cypress binary cache
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('pnpm-lock.yaml') }}
|
The PR markoleavy/cypress-test#1 merged successfully into your demo repo, so unless there is anything else open for you I would suggest to close the issue here. |
Hello @MikeMcC399. |
I updated the version string in a package in my pnpm workspace and cypress, that worked fine before, started failing on the binary being missing. Tried adding both cypress cache, pnpm cache and |
To keep the issues clean, please open a new one. Thanks for providing your repo link, that is always very helpful for troubleshooting. |
Created a new one: #1138 |
I have a monorepo that uses pnpm workspace, structured like that
This is my job setup:
I also tried this cache config as suggested on PR #1043
That the log that the Run test action returns:
I'm using Cypress 13.3.1 and that the config file
The text was updated successfully, but these errors were encountered: