In a Dev category discussion titled “Trouble with theme lint at ‘install JS Dependencies’ step,” pfaffman reports CI failures after copying package.json from discourse-theme-skeleton. The issue arises because GitHub Actions runs yarn install, but the project specifies pnpm via packageManager in package.json, triggering a Corepack mismatch error. merefield identifies the root cause: the repo contains a stale yarn.lock file, which should be removed in favor of pnpm-lock.yaml. After following this advice, pfaffman encounters a PNPM_LOCKFILE_CONFIG_MISMATCH error, resolved by running pnpm install --no-frozen-lockfile. However, a new error appears: Could not locate Gemfile, which merefield clarifies is required by the CI script, even if the project doesn’t use Ruby. pfaffman confirms copying Gemfile, Gemfile.lock, and stylelint.config.mjs from discourse-theme-skeleton, but still faces the pnpm lockfile mismatch. merefield reiterates that Gemfile is CI-mandated regardless of language use. The thread highlights CI configuration pitfalls when mixing package managers and emphasizes using PRs to avoid breaking main branches.
Linting works with my attempts to run the Right Stuff locally, but in github, I get this:
Run yarn install --frozen-lockfile
error This project's package.json defines "packageManager": "yarn@pnpm@9.15.5". However the current global version of Yarn is 1.22.22.
Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
And that’s in the “install JS Dependencies” step, so it would seem like this can’t be because of anything I’ve done?
That’s true. I’m starting to try to remember to do that; it’s just not automatized yet. I’m up to doing it about 30% of the time.
Now I’ve got this:
Run pnpm install --frozen-lockfile
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile
Update your lockfile using "pnpm install --no-frozen-lockfile"
So then I did what it told me, and now I get:
Run bundle install
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
Could not locate Gemfile
But when I ran pnpm install --no-frozen-lockfile and then used the new lock file, github then gave me the bundler error. I should be able to use the one in discourse-theme-skeleton, right?
That’s the stuff we need, right? Turns out that stylelint.config.mjs was out of date, so that’s something.
Anyway, I’ve still got
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Cannot proceed with the frozen installation. The current "settings.autoInstallPeers" configuration doesn't match the value found in the lockfile