# The "shop" service is synthetic, it needs to be set at boot time before it can be used. Shopware 5.7.13

**URL:** <https://forum.shopware.com/t/the-shop-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used-shopware-5-7-13/95380>\
**Category:** Shopware 5\
**Tags:** programming\
**Created:** [20. Juli 2022 um 10:03 UTC](https://forum.shopware.com/t/the-shop-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used-shopware-5-7-13/95380 "2022-07-20T10:03:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![marko.richter](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@marko.richter](https://forum.shopware.com/u/marko.richter)\
**Post date:** [20. Juli 2022 um 12:11 UTC](https://forum.shopware.com/t/the-shop-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used-shopware-5-7-13/95380/4 "2022-07-20T12:11:19Z")

</div>

> public function onCollectJsFiles(\Enlight\_Event\_EventArgs $args)  
> {  
> // empty  
> }

The problem goes even so far, that the empty function and the subscriber creates the error on compile.

But i found a way now to fix it.

> [@\[PLUGIN\]\[EVENTS\]\[Theme\_Compiler\_Collect\_Plugin\_Less|Theme\_Compiler\_Collect\_Plugin\_Javascript\] Wie?](https://forum.shopware.com/t/plugin-events-theme-compiler-collect-plugin-less-theme-compiler-collect-plugin-javascript-wie/52880/5?utm_source=google&utm_medium=cpc&utm_campaign=nb-o04_nrt_dach_de_awareness_performance-max_store-sales&utm_content=maxperformance&gclid=Cj0KCQjwz96WBhC8ARIsAATR250PD07tEjeh1dlJnLpxnzR9Y8bJnrJyiQUA7N5FzftyAkVVkbzH2VkaAkzTEALw_wcB):
>
> Uhh sorry, vor lauter tippen & zippen hab ich doch glatt meine Antwort vergessen… ^^ [@Moritz Naczenski schrieb:](https://forum.shopware.com/profile/14574/Moritz%20Naczenski "Moritz%20Naczenski") Das ist hier im Startup-Guide aber auch alles beschrieben:&nbsp;[https://developers.shopware.com/developers-guide/plugin-quick-start/#extending-the-template](https://developers.shopware.com/developers-guide/plugin-quick-start/#extending-the-template) Ich pick mir davon mal das meines Erachtens wesentlichste heraus: Frontend resources auto-registration[Anchor link for: frontend resources auto registration](https://developers.shopware.com/developers-guide/plugin-quick-start/#frontend-resources-auto-registration) Additions to CSS, LESS and JavaScript resources had to be registered via T…

I removed the subscriber for the js and use the auto include from shopware by placing it in the dir

> \<plugin\_dir\>/Resources/frontend/js/

Now the Error is gone and the js is back on the page. At least i have not found new errors 🙂

Still thank you and i hope this helps others that may get the same issue.

---

_[View the full topic](https://forum.shopware.com/t/the-shop-service-is-synthetic-it-needs-to-be-set-at-boot-time-before-it-can-be-used-shopware-5-7-13/95380)._
