我正在开发一个Laravel应用程序,并准备好编写代码。然而,当我运行最后一个composer update
来验证所有内容时,我得到了以下错误:
$ composer update
Loading composer repositories with package information
[UnexpectedValueException]
RecursiveDirectoryIterator::__construct(packages): failed to open dir: No such file or directory
我已尝试使用composer clearcache
清除composer缓存。我试过用composer dumpautoloads
卸载自动装载。
我确信这是我做过的事情,但它似乎是凭空发生的。
下面是我的composer.json
{
"name": "test/tickets",
"description": "Ticketing System",
"type": "project",
"require": {
"laravel/framework": "5.0.*",
"laravel/socialite": "~2.0",
"illuminate/html": "^5.0",
"guzzlehttp/guzzle": "~5.0",
"contao-community-alliance/composer-client": "~0.14"
},
"license": "MIT",
"authors": [
{
"name": "",
"email": ""
}
],
"repositories": [
{
"type": "composer",
"url": "https://legacy-packages-via.contao-community-alliance.org/"
},
{
"type": "artifact",
"url": "packages"
}
],
"config": {
"component-dir": "../assets/components"
}
}
如果您能提供任何指导,我们将不胜感激。
我最终使用composer init
创建了一个新的、干净的composer.json,并且只需要必要的包(基本上与上面相同,没有composer客户端(。然后,我用rm -rf vendor
删除了整个供应商目录,并运行了composer install
。所有内容都已成功下载并安装。composer update
现在工作。