`npm_package` variables not set when processing `cypress/plugins/index.js`
We're using a webpack config that makes use of npm_package_name and npm_package_version.
These are not set during the run - which is confusing as it looks like npx is used to run the job.
I'd expect the npm_package_... variables to be set just like when i run npx cypress run locally.
Ahaha, I see we had the same issue @max-nextcloud :cry:
@max-nextcloud
It looks like you were able to resolve your issue.
Can this be closed now?
Closing, since this is a stale, inactive issue.
It looks like you were able to resolve your issue.
I was able to find a workaround by setting npm_package_name in the env even though it should be set by npx. If i remove the workaround the run still fails: https://github.com/nextcloud/text/actions/runs/6812145616/job/18524231320
Can this be closed now?
Your choice. The issue in the action still is there but a workaround exists.
@max-nextcloud
Thanks for responding!
Since v2, the action uses Module API to run Cypress (see CHANGELOG), so at that point neither npm nor npx are involved.
The cypress/plugins/index.js is no longer supported (see Plugins File Removed). This affects all non-legacy versions of Cypress starting with 10.x including the current 13.x version. The repo https://github.com/nextcloud/text, which this issue is linked to, looks like it has already migrated to Cypress 13.x.
So, I would tend to leave this issue closed if you have a workaround which fits your needs. If there is anything which needs investigating, then probably a new issue would be better than re-opening this one, due to migration differences.