# Theme lässt sich nicht erstellen / zuordnen -\> Node.js

**URL:** https://forum.shopware.com/t/theme-laesst-sich-nicht-erstellen-zuordnen-node-js/102940
**Category:** Allgemein
**Created:** [13. Februar 2024 um 09:04 UTC](https://forum.shopware.com/t/theme-laesst-sich-nicht-erstellen-zuordnen-node-js/102940 "2024-02-13T09:04:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hallo3](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hallo3](https://forum.shopware.com/u/hallo3)
#### Post date: [13. Februar 2024 um 09:04 UTC](https://forum.shopware.com/t/theme-laesst-sich-nicht-erstellen-zuordnen-node-js/102940/1 "2024-02-13T09:04:11Z")

</div>

Wenn ich ein neu erstelltes Theme via bin/console theme:change zuordnen möchte, erhalte ich die folgende Fehlermeldung:

Set and compiling theme „DnsSale“ (018d9e0c936970de861e3edde294bfcb) as new theme for sales channel „DNS-Sale“  
16:21:52 CRITICAL [console] Error thrown while running command „theme:change“. Message: „Unable to compile the theme „DnsSale“. Files could not be resolved with error: Unable to compile the theme „DnsSale“. Unable to load file „custom/plugins/DnsSale/src/Resources/app/storefront/dist/storefront/js/dns-sale/dns-sale.js“. Did you forget to build the theme? Try running ./bin/build-storefront.sh“ [„exception“ =\> Shopware\Storefront\Theme\Exception\ThemeCompileException^ { …},„command“ =\> „theme:change“,„message“ =\> „Unable to compile the theme „DnsSale“. Files could not be resolved with error: Unable to compile the theme „DnsSale“. Unable to load file „custom/plugins/DnsSale/src/Resources/app/storefront/dist/storefront/js/dns-sale/dns-sale.js“. Did you forget to build the theme? Try running ./bin/build-storefront.sh“]

In ThemeCompiler.php line 70:

Unable to compile the theme „DnsSale“. Files could not be resolved with err  
or: Unable to compile the theme „DnsSale“. Unable to load file „custom/plug  
ins/DnsSale/src/Resources/app/storefront/dist/storefront/js/dns-sale/dns-sa  
le.js“. Did you forget to build the theme? Try running ./bin/build-storefro  
nt.sh

In ThemeFileResolver.php line 117:

Unable to compile the theme „DnsSale“. Unable to load file „custom/plugins/  
DnsSale/src/Resources/app/storefront/dist/storefront/js/dns-sale/dns-sale.j  
s“. Did you forget to build the theme? Try running ./bin/build-storefront.sh

Dann führe ich bin/build-storefront.sh in der Konsole aus:

bin/build-storefront.sh

[OK] Dumped plugin configuration.  
[OK] Successfully dumped js feature configuration

Cannot check extensions for required npm installations as jq is not installed  
nodenv: npm: command not found

The `npm’ command exists in these Node versions:  
18  
20  
21

ABER: Die nicht gefundenen Dateien custom/plugins/DnsSale/src/Resources/app/storefront/dist/storefront/js/dns-sale/dns-sale.js sind auf dem Server, nur nicht an dieser Stelle, sondern hier:  
custom/plugins/DnsSale/src/Resources/app/storefront/dist/storefront/js/dns-sale.js  
Also OHNE /dns-sale/ vor dem Dateinamen dns-sale.js was meiner Meinung nach auch richtig wäre.  
Woher kommt dieser zusätzliche Pfad?

Herzlichen Dank für jede Hilfe!

---

<div class="post-metadata">

### Author: ![hallo3](https://avatars.discourse-cdn.com/v4/letter/h/8dc957/32.png) [@hallo3](https://forum.shopware.com/u/hallo3)
#### Post date: [13. Februar 2024 um 10:23 UTC](https://forum.shopware.com/t/theme-laesst-sich-nicht-erstellen-zuordnen-node-js/102940/2 "2024-02-13T10:23:00Z")

</div>

Habe den Fehler gefunden, es war wie vermutet eine falsche Pfadangabe in /custom/plugins/themename/src/theme.json. Dort war tatsächlich vor der themename.js noch ein Verzeichnis /themename/ Wie es dazu gekommen ist, habe ich nicht die geringste Ahnung - würde mich aber sehr interessieren!
