0
votes

I am trying to download Laravel but composer is showing error and stop the installation process after taking much time. I am quoting the exact error,

[Composer\Downloader\TransportException] Content-Length mismatch, received 131768 bytes out of the expected 353797

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []

How can I fix this error and start working on Laravel!

UPDATE - I have made the following changes in config.json file.

 {
  "config": {
    "github-protocols": [
      "https"
    ]
  },
  "repositories": {
    "packagist.org": {
      "type": "composer",
      "url": "https://packagist.org"
    }
  }
}

But then, it also not working!

1

1 Answers

-1
votes

your "repositories" key in composer.json should be like this:

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