Description
We are using pnpm (https://pnpm.js.org/) with our project. As such, we do not have a package-lock.json
file. Even setting install to false fails with the cypress github action (see below).
Pnpm uses a pnpm-lock.yaml
file that serves the same purpose, and generally (though not always) has the same syntax as npm. However, the lockfile formats are not compatible.
This action installs local dependencies using lock files. If yarn.lock file is found, the install uses yarn --frozen-lockfile command. Otherwise it expects to find package-lock.json and install using npm ci command.
internal/fs/utils.js:220
throw err;
^
Error: ENOENT: no such file or directory, open 'package-lock.json'
at Object.openSync (fs.js:440:3)
at Object.readFileSync (fs.js:342:35)
at Function.module.exports.309.hasha.fromFileSync (/home/runner/work/_actions/cypress-io/github-action/v1.16.1/dist/index.js:4439:54)
at Object.104 (/home/runner/work/_actions/cypress-io/github-action/v1.16.1/dist/index.js:2440:24)
at __webpack_require__ (/home/runner/work/_actions/cypress-io/github-action/v1.16.1/dist/index.js:22:30)
at startup (/home/runner/work/_actions/cypress-io/github-action/v1.16.1/dist/index.js:37:19)
at /home/runner/work/_actions/cypress-io/github-action/v1.16.1/dist/index.js:41:18
at Object.<anonymous> (/home/runner/work/_actions/cypress-io/github-action/v1.16.1/dist/index.js:44:10)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'package-lock.json'
}
If relevant, there is a github action for pnpm: https://github.com/marketplace/actions/setup-pnpm
They also have these docs that might be relevant: https://pnpm.js.org/en/continuous-integration