Skip to content

when generating a project with the github actions and pnpm the github actions aren't configured for pnpm #638

@dannyhw

Description

@dannyhw

If you generate a project and pick pnpm and choose to use remote build with github actions then the actions will fail because they aren't setup for pnpm

this is the error

Environment details
/Users/runner/hostedtoolcache/node/20.19.6/arm64/bin/npm config get cache
/Users/runner/.npm
 Supported file patterns: package-lock.json,npm-shrinkwrap.json,yarn.lock

Heres a public repro:
https://github.com/dannyhw/rock-pnpm-repro

and an example failed job:
https://github.com/dannyhw/rock-pnpm-repro/actions/runs/19855464179/job/56892178876

heres the options I chose

callstack pnpm create rock

◇  What platforms do you want to start with? (Press <space> to select,
<enter> to skip):
│  iOS, Android
│
◇  Which bundler do you want to use?
│  Re.Pack
│
◇  Which plugins do you want to use? (Press <space> to select, <enter> to
skip):
│  none
│
◇  What do you want to use as cache for your remote builds?
│  GitHub Actions
◇  Do you want to install dependencies?
│  Yes
│

I believe the action should include this so that it would work

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - uses: pnpm/action-setup@v4
        name: Install pnpm
        with:
          version: 10
          run_install: false

      - name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'pnpm'

      - name: Install dependencies
        run: pnpm install

or corepack should be enabled on the runner and replace the cache provider

I'm happy to contribute a fix :)

edit:

Seems like this would require a new functionality to either provide separate templates for different package managers or replace the content in the github action files, something along those lines. Curious what you think would be the right approach for rock in this case.

Also probably should add node-linker=hoisted in .npmrc since pod install seems to fail without it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions