# Problem mit Theme Lint beim Schritt „JS-Abhängigkeiten installieren“

**URL:** https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423
**Category:** Development
**Created:** [1. Juni 2025 um 16:08 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423 "2025-06-01T16:08:06Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1. Juni 2025 um 16:08 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/1 "2025-06-01T16:08:06Z")

</div>

Ich habe `[package.json](https://github.com/discourse/discourse-theme-skeleton/blob/main/package.json)` aus dem neuesten [discourse-theme-skeleton/package.json at main · discourse/discourse-theme-skeleton · GitHub](https://github.com/discourse/discourse-theme-skeleton/blob/main/package.json) kopiert

Es ist nicht groß:

```plaintext
{
private: true,
devDependencies: {
@discourse/lint-configs: "2.21.0",
ember-template-lint: "7.7.0",
eslint: "9.27.0",
prettier: "3.5.3",
stylelint: "16.19.1"
},
engines: {
node: ">= 22",
npm: "please-use-pnpm",
yarn: "please-use-pnpm",
pnpm: "9.x"
},
packageManager: "pnpm@9.15.5"
}

```

Linting funktioniert mit meinen Versuchen, The Right Stuff lokal auszuführen, aber in GitHub erhalte ich Folgendes:

```plaintext
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.

```

Und das ist im Schritt “JS-Abhängigkeiten installieren”, daher scheint es nicht an mir zu liegen?

Hier ist mein Code: [GitHub - pfaffman/discourse-custom-homepage-for-groups: Discourse theme component to change home page based on user's primary group](https://github.com/pfaffman/discourse-custom-homepage-for-groups)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [1. Juni 2025 um 16:12 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/2 "2025-06-01T16:12:11Z")

</div>

> [@pfaffman](#):
>
> `Run yarn install --frozen-lockfile`

FWIW sieht das nach dem problematischen Schritt aus?  
Yarn sollte gar nicht laufen?

(PS, lieben Sie es nicht, wenn Sie 15 Minuten brauchen, um ein Repository zu aktualisieren, und dann ein Meta-Problem Sie Stunden kostet 😅 )

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [1. Juni 2025 um 16:25 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/4 "2025-06-01T16:25:38Z")

</div>

Das ist Ihr Problem:

> <https://github.com/discourse/.github/blob/0efb1ef3d0f5c1ad836edcfd617220e6fbfa8809/.github/workflows/discourse-theme.yml#L48C19-L48C29>

Entfernen Sie Ihre `yarn.lock`-Datei aus dem Repository, aber lassen Sie Ihre `pnpm-lock.yaml`-Datei (und aktualisieren Sie sie!).

Bonuspunkte 🏅 Idealerweise wäre dies ein PR gewesen, damit Sie keinen fehlerhaften CI auf Ihrem Hauptbranch haben.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1. Juni 2025 um 17:46 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/5 "2025-06-01T17:46:55Z")

</div>

> [@merefield](#):
>
> Bonuspunkte: Idealerweise wäre dies ein PR gewesen, damit Sie keinen fehlerhaften CI auf Ihrem Hauptbranch haben.

Das stimmt. Ich fange an, mich daran zu erinnern, das zu tun; es ist nur noch nicht automatisiert. Ich schaffe es etwa 30 % der Zeit. 🙂

* * *

Jetzt habe ich das:

```plaintext
Run pnpm install --frozen-lockfile
 ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Kann mit der eingefrorenen Installation nicht fortfahren. Die aktuelle Konfiguration \"settings.autoInstallPeers\" stimmt nicht mit dem Wert in der Lockdatei überein.

Aktualisieren Sie Ihre Lockdatei mit \"pnpm install --no-frozen-lockfile\"

```

Also habe ich getan, was mir gesagt wurde, und jetzt bekomme ich:

```plaintext
Run bundle install
Bundler nicht als Root ausführen. Wenn Sie Ihr Bundle als Root installieren, wird diese Anwendung für alle Nicht-Root-Benutzer auf diesem Computer fehlschlagen.
Could not locate Gemfile

```

Aber wenn ich das mache:

```plaintext
 (main *) pfaffman@noreno:~/src/pfaffman/discourse-custom-homepage-for-groups$ cp ~/src/discourse-repos/discourse-theme-skeleton/pnpm-lock.yaml .
 (main *) pfaffman@noreno:~/src/pfaffman/discourse-custom-homepage-for-groups$ git add pnpm-lock.yaml
 (main +) pfaffman@noreno:~/src/pfaffman/discourse-custom-homepage-for-groups$ git commit -m 'ihr pnpm lock'
[main e195a2e] ihr pnpm lock
 1 file changed, 1 insertion(+), 1 deletion(-)
 (main) pfaffman@noreno:~/src/pfaffman/discourse-custom-homepage-for-groups$ git push

```

und ich bin sicher, dass ihr Repo auf dem neuesten Stand ist.

Sehen Sie? Und es erinnert mich sogar daran, dass ich unverantwortlich auf dem Hauptbranch arbeite.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [1. Juni 2025 um 17:48 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/6 "2025-06-01T17:48:56Z")

</div>

> [@pfaffman](#):
>
> ```plaintext
> Führen Sie pnpm install --frozen-lockfile aus
> ERR_PNPM_LOCKFILE_CONFIG_MISMATCH Kann mit der eingefrorenen Installation nicht fortfahren. Die aktuelle Konfiguration „settings.autoInstallPeers“ stimmt nicht mit dem Wert in der Lockfile überein
> 
> Aktualisieren Sie Ihre Lockfile mit „pnpm install --no-frozen-lockfile“
> 
> ```

Ich vermute, dies ist nur eine veraltete pnpm-lock-Datei… führen Sie eine Installation im Verzeichnis aus.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1. Juni 2025 um 17:52 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/7 "2025-06-01T17:52:01Z")

</div>

Aber als ich `pnpm install --no-frozen-lockfile` ausgeführt und dann die neue Lock-Datei verwendet habe, gab Github mir den Bundler-Fehler. Ich sollte doch die in `discourse-theme-skeleton` verwenden können, oder?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [1. Juni 2025 um 17:53 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/8 "2025-06-01T17:53:45Z")

</div>

> [@pfaffman](#):
>
> `Could not locate Gemfile`

Fügen Sie die Gemfile hinzu

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1. Juni 2025 um 18:03 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/9 "2025-06-01T18:03:18Z")

</div>

Warte. Die `Gemfile` ist für Ruby, richtig?

Aber hier:

```plaintext
pfaffman@noreno:~$ cd src/discourse-repos/discourse-theme-skeleton/
 (main) pfaffman@noreno:~/src/discourse-repos/discourse-theme-skeleton$ cp pnpm-lock.yaml Gemfile.lock Gemfile package.json stylelint.config.mjs ~/src/pfaffman/discourse-custom-homepage-for-groups/

```

Das sind die Sachen, die wir brauchen, richtig? Es stellt sich heraus, dass `stylelint.config.mjs` veraltet war, das ist also etwas.

Wie auch immer, ich habe immer noch

```plaintext
 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

```

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [1. Juni 2025 um 18:13 UTC](https://meta.discourse.org/t/trouble-with-theme-lint-at-install-js-dependencies-step/368423/10 "2025-06-01T18:13:41Z")

</div>

> [@pfaffman](#):
>
> Warte. Die `Gemfile` ist für Ruby, richtig?

Ich schätze, es ist für alle Spezifikationen, es wird vom CI-Skript benötigt.
