Closed lukey-aleios closed 1 year ago
You can either:
version
field: https://github.com/pnpm/action-setup/tree/v2.4.0#versionpackage_json_file
field: https://github.com/pnpm/action-setup/tree/v2.4.0#package_json_fileAh, this was resolved! Nice work
To make this issue clearer for those who see it, here are some important points on how to use pnpm/action-setup
without putting package.json
in the root directory.
working directory
for github actionscwd
as an option for run_install
If the above two points are satisfied, you can use pnpm/action-setup
even if your project does not have package.json in root.
name: ci
on: push
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: foo
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
run_install: |
- args: [--frozen-lockfile]
cwd: foo
ref: https://github.com/konojunya/not-root-pnpm-setup/actions/runs/7768165983/job/21185784600
Hi,
I'm working on a project with a separate backend & frontend directories, with individual package.json files. This step causes an issue for me because it fails when there isn't a package.json file in the top directory. Here's the line that is the likely culprit:
https://github.com/pnpm/action-setup/blob/0b715c7ebbf3cf2174d1386336c5f6d3d8d5504a/src/install-pnpm/run.ts#L14
Do you know any workaround for this?