php - Class 'Laracon21ColorcodeconverterColorcodeconverterServiceProvider' not found

I am trying to run a Laravel project but I am getting the following error:
$ php artisan config:cache
In ProviderRepository.php line 208:
Class 'Laracon21\Colorcodeconverter\ColorcodeconverterServiceProvider' not found
I triedcomposer require laracon21/colorcodeconverter
to addlaracon21
, it's added in the vendor folder successfully but the composer does not update perfectly, showing:
Problem 1
- Conclusion: don't install laravel/framework v6.20.30
- Conclusion: don't install laravel/framework v6.20.29
- Conclusion: don't install laravel/framework v6.20.28
- Conclusion: don't install laravel/framework v6.20.27
.
.
.
- Conclusion: don't install laravel/framework v6.0.0
- laracon21/colorcodeconverter 1.1 requires illuminate/support ^7.0 -> satisfiable by laravel/framework[7.x-dev], illuminate/support[7.x-dev, v7.0.0, v7.0.1, v7.0.2, v7.0.3, v7.0.4, v7.0.5, v7.0.6, v7.0.7, v7.0.8, v7.1.0, v7.1.1, v7.1.2, v7.1.3, v7.10.0, v7.10.1, v7.10.2, v7.10.3, v7.11.0, v7.12.0, v7.13.0, v7.14.0, v7.14.1, v7.15.0, v7.16.0, v7.16.1, v7.17.0, v7.17.1, v7.17.2, v7.18.0, v7.19.0, v7.19.1, v7.2.0, v7.2.1, v7.2.2, v7.20.0, v7.21.0, v7.22.0, v7.22.1, v7.22.2, v7.22.3, v7.22.4, v7.23.0, v7.23.1, v7.23.2, v7.24.0, v7.25.0, v7.26.0, v7.26.1, v7.27.0, v7.28.0, v7.28.1, v7.28.2, v7.28.3, v7.28.4, v7.29.0, v7.29.1, v7.29.2, v7.29.3, v7.3.0, v7.30.0, v7.30.1, v7.30.2, v7.30.3, v7.30.4, v7.4.0, v7.5.0, v7.5.1, v7.5.2, v7.6.0, v7.6.1, v7.6.2, v7.7.0, v7.7.1, v7.8.0, v7.8.1, v7.9.0, v7.9.1, v7.9.2].
- Can only install one of: laravel/framework[7.x-dev, 6.x-dev].
- don't install illuminate/support 7.x-dev|don't install laravel/framework 6.x-dev
- don't install illuminate/support v7.0.0|don't install laravel/framework 6.x-dev
- don't install illuminate/support v7.0.1|don't install laravel/framework 6.x-dev
- don't install illuminate/support v7.0.2|don't install laravel/framework 6.x-dev
And here is mycomposer.json
:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2",
"anandsiddharth/laravel-paytm-wallet": "^1.0",
"barryvdh/laravel-dompdf": "^0.8.2",
"fideloper/proxy": "^4.0",
"gabrielbull/ups-api": "^0.8.0",
"guzzlehttp/guzzle": "^6.5",
"instamojo/instamojo-php": "^0.4.0",
"laracasts/flash": "^3.0",
"laracon21/colorcodeconverter": "^1.1",
"laravel/framework": "6.*",
"laravel/passport": "^7.3",
"laravel/socialite": "^4.3",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.1",
"mehedi-iitdu/core-component-repository": "dev-master",
"mehedi-iitdu/laravel-paystack": "dev-master",
"mehedi-iitdu/paypal": "dev-master",
"nexmo/laravel": "^2.2",
"razorpay/razorpay": "2.0.0",
"spatie/laravel-image-optimizer": "^1.3",
"stripe/stripe-php": "^6.29",
"twilio/sdk": "^6.1"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
},
"files": ["app/Http/Helpers.php"]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
"laravel/dusk"
]
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Please help me. how can I solve this?
Answer
Solution:
Don't you see it requireslaravel: ^7.0.0
? You are trying to uselaravel: ^6.x
...
The error says it clearly:illuminate/support ^7.0
,don't install laravel/framework v6.0.0
.
So, you must change it to7.x
.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: using $this when not in object context laravel
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.