# Problem beim erstellen von Plugins

**URL:** <https://forum.shopware.com/t/problem-beim-erstellen-von-plugins/69801>\
**Category:** Programmierung\
**Created:** [23. September 2020 um 13:54 UTC](https://forum.shopware.com/t/problem-beim-erstellen-von-plugins/69801 "2020-09-23T13:54:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeterM](https://avatars.discourse-cdn.com/v4/letter/p/a9adbd/32.png) [@PeterM](https://forum.shopware.com/u/PeterM)\
**Post date:** [23. September 2020 um 13:54 UTC](https://forum.shopware.com/t/problem-beim-erstellen-von-plugins/69801/1 "2020-09-23T13:54:01Z")

</div>

Ich habe mir eine dev-Umgebung wie hier beschrieben eingerichtet ( shopware.ova ):  
[Shopware 6 - Setting Up a Local Environment with Virtual Box](https://docs.shopware.com/en/shopware-6-en/tutorials-and-faq/virtual-box-setup?category=shopware-6-en/tutorials-and-faq)  
Und dann zum testen [Shopware 6: Add new module to administration](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-module) in /custom/plugins/CustomModule/ eingefügt & die /public/…/custom-module.js gelöscht  
und mit ./psh.phar administration:build versucht es zu erstellen. Wobei es ohne erkennbaren Fehler durchlief und &nbsp;_bin/console assets:install auch „CustomModule&nbsp;&nbsp;&nbsp;&nbsp; copy“_ angezeigt hat. Dennoch wurde keine neue /public/…/custom-module.js erstellt.  
Nach viel suchen hab ich fest gestellt, dass

# Webpack Plugin Injector: Plugin „CustomModule“ injected as a new entry point

nicht in der Konsole im 2. Schritt von&nbsp;administration:build aufgelistet ist.  
Nach weiterem suchen fiel mir auf, dass in /var/plugins.json der Eintrag für CustomModule bei _entryFilePath_ auf null steht.

```
"CustomModule": {
    "basePath": "\/var\/www\/html\/sw6\/custom\/plugins\/CustomModule\/src\/",
    "views": [
        "Resources\/views"
    ],
    "administration": {
        "path": "Resources\/administration",
        "entryFilePath": null,
        "webpack": null
    },
    "storefront": {
        "path": "Resources\/storefront",
        "entryFilePath": null,
        "webpack": null,
        "styleFiles": []
    }
}

```

Also „Resources/app/administration/src/main.js“ eingefügt und „PROJECT\_ROOT=/var/www/html/sw6 npm run --prefix vendor/shopware/platform/src/Administration/Resources/administration/ build“ ausgeführt. Dann wurde die /public/…/custom-module.js auch ohne Fehler erstellt. Dann noch „bin/console assets:install“ und im Shopware-Backend der Dev-Vm geprüft, ob der neue Tab erstellt wurde: Ja er wird angezeigt und funktioniert.

Ich hab also folgendes Problem:

- bin/console bundle:dump erstellt eine praktisch nutzlose /var/plugins.json  
Hat noch jemand ein solches Problem?

Hier noch ein Bild wie das Plugin aufgebaut ist

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/e/eb92a6056a223c2e002765165e327d46b83aff60.png)  
Edit: Wo ich schon mal dabei bin: Was muss in „styleFiles“ : rein, damit man auch .scss kompiliert bekommt?
