There is no role named `` with composer install --optimize-autoloader --no-dev
philharmonie opened this issue · 0 comments
philharmonie commented
Describe the bug
When I deploy to production and run composer install --optimize-autoloader --no-dev
I get
There is no role named ``. {"userId":2,"exception":"[object] (Spatie\\Permission\\Exceptions\\RoleDoesNotExist(code: 0): There is no role named ``. at C:\\inetpub\\wwwroot\\app\\vendor\\spatie\\laravel-permission\\src\\Exceptions\\RoleDoesNotExist.php:11)
When I run just composer install --optimize-autoloader
the error is the same.
When I run just composer install --no-dev
the error is the same.
When I then run composer install
the error disappears and everything works fine.
In my composer.json
I have:
"require-dev": {
"barryvdh/laravel-debugbar": "^3.6",
"barryvdh/laravel-ide-helper": "^2.12",
"fakerphp/faker": "^1.9.1",
"laravel/breeze": "^1.9",
"laravel/pint": "^1.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
},
Versions
You can use composer show
to get the version numbers of:
- spatie/laravel-permission package version: 5.7.0
- laravel/framework: v9.43.0
PHP version: 8.1
Database version: mysql-server8
Additional context
Add any other context about the problem here.
Environment (please complete the following information, because it helps us investigate better):
- OS: Windows Server
- Version 22