Skip to content
Advertisement

Installing laravel suddenly some json file cannot be downloaded

I typed create-project laravel/laravel "foldername" and got this message:

[ComposerDownloaderTransportException] The “http://packagist.org/p/illuminate/console%241d2f57f687204b9a57e5848fe9f49e79bc2fb7ed0cafc6d1387ad4760a1b155c.json” file could not be downloaded (HTTP/1.1 404 Not Found)

What’s this for? I already got the laravel structure files but i don’t want to continue without knowing whats with this error.

Update: composer.json content under my laravel folder structure

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\": "app/"
    }
},
"autoload-dev": {
    "psr-4": {
        "Tests\": "tests/"
    }
},
"scripts": {
    "post-root-package-install": [
        "php -r "file_exists('.env') || copy('.env.example', '.env');""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\Foundation\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\Foundation\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist",
    "sort-packages": true,
    "optimize-autoloader": true
}

}

Advertisement

Answer

add this on your composer:

"repositories": [
    {
         "type": "composer", 
         "url": "https://packagist.org"
    },
    { "packagist": false }
]

and run composer update once again. If not then run composer self-update

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement