Issue installing Carbon package in Laravel 5.8

Today, I got this error while I’m trying to install Laravel Dusk.

Error message with Carbon package

The error message said that we need to use the new version of Carbon instead of current version 2.18.0. Since Laravel has already used the Carbon as default but it used 2.1*. So I alias the current version as the latest version in composer.json.

    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0",
        "nesbot/carbon": "2.18.0 as 1.34.0"

Finally, I ran the command install the Laravel Dusk again. The error has gone.

The installation Laravel Dusk successfully

Leave a comment