nWidart / laravel-modules

Module Management In Laravel
https://docs.laravelmodules.com
MIT License
5.54k stars 964 forks source link

Creating module error: mkdir(): File exists #1894

Closed sr-44 closed 2 months ago

sr-44 commented 3 months ago
rm -rf Modules/WishList
sail artisan optimize:clear
sail artisan module:make WishList --api --force

изображение

package version: "nwidart/laravel-modules": "^10.0"

sr-44 commented 3 months ago

изображение

solomon-ochepa commented 3 months ago
rm -rf Modules/WishList
sail artisan optimize:clear
sail artisan module:make WishList --api --force

изображение

package version: "nwidart/laravel-modules": "^10.0"

You removed the module wrongly!

To delete the WishList module, use sail artisan module:delete WishList instead of rm -rf Modules/WishList.

To recreate the module, remove the module from the modules-status.json file at the root.

faridibin commented 3 months ago

@sr-44

Autoloading from v11.0 autoloading "Modules\": "modules/", is no longer required.

By default the module classes are not loaded automatically. You can autoload your modules by adding merge-plugin to the extra section:

"extra": {
    "laravel": {
        "dont-discover": []
    },
    "merge-plugin": {
        "include": [
            "Modules/*/composer.json"
        ]
    }
},