John Davidson

php - laravel newsletter spatie is not installing in laravel 5.8


I am trying to install spatie laravel newsletter package but i am getting an error message

Problem 1
- Root composer.json requires spatie/laravel-newsletter ^4.9 -> satisfiable by spatie/laravel-newsletter[4.9.0].
- spatie/laravel-newsletter 4.9.0 requires illuminate/support ^6.0|^7.0|^8.0 -> found illuminate/support[v6.0.0, ..., 6.x-dev,
v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded,
likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to
their original content.

my composer.json file looks like this

"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"license": "MIT",
"require": {
"php": "^7.1.3",
"fideloper/proxy": "^4.0",
"gufy/pdftohtml-php": "~2",
"intervention/image": "^2.5",
"jenssegers/agent": "^2.6",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.1"
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
"extra": {
"laravel": {
"dont-discover": []
"autoload": {
"psr-4": {
"App\\": "app/"
"classmap": [
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"@php artisan package:discover --ansi"
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
"post-create-project-cmd": [
"@php artisan key:generate --ansi"

Not able to understand how to resolve the issue. I can't upgrate laravel 5.8 to 8 because it will take a lot of time.

My Answer:
but your composer.json file is currently set to require version ^5.0. This version conflict is causing the installation to fail.

To resolve this issue, you can update your composer.json file to require version ^4.9 of the spatie/laravel-newsletter package. You can do this by running the following command in your terminal:

composer require spatie/laravel-newsletter:^4.9

After updating your composer.json file, run `composer update` to install the correct version of the package.

Alternatively, if you need to use version 5.0 of the package, you can check if there are any updates or patches available for your Laravel version that are compatible with the latest version of the spatie/laravel-newsletter package. You can also reach out to the package maintainers for assistance or look for alternative packages that are compatible with Laravel 5.8.

Rate this post

3 of 5 based on 2471 votes


© 2024 - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us