作曲家。错误:在有效的作曲家.json 上"Could not parse version constraint..."



问题:Get无法解析有效composer.json的版本约束。

我有/srv/www/site/api/composer。json/srv/www/site/frontend/composer.json。没有作曲家。在目录/srv/www/site/api/和/srv/www/site/frontend/

中锁定或vendor/

Api作曲家。Json和前端编写器。Json包含相同的文本:

{
    "minimum-stability": "stable",
    "require":
    {
        "doctrine/dbal": "*"
    },
    "autoload":
    {
        "psr-4":
        {
            "app\": "./"
        }
    }
}

。我运行。

cd /srv/www/site/api
composer install

并得到结果。好的。

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing doctrine/lexer (v1.0.1)
    Loading from cache
  - Installing doctrine/annotations (v1.2.7)
    Loading from cache
  - Installing doctrine/cache (v1.4.2)
    Loading from cache
  - Installing doctrine/collections (v1.3.0)
    Loading from cache
  - Installing doctrine/inflector (v1.0.1)
    Loading from cache
  - Installing doctrine/common (v2.5.1)
    Loading from cache
  - Installing doctrine/dbal (v2.5.2)
    Loading from cache
doctrine/dbal suggests installing symfony/console (For helpful console commands such as SQL execution and import of files.)
Generating autoload files
noopic@WhiteBear:/srv/www/dev.laronet.ee/api$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

。我运行。

cd /srv/www/site/frontend
composer install

并得到结果。错误。

  [UnexpectedValueException]                                       
  Could not parse version constraint >: Invalid version string ""  

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [packages1] ... [packagesN]

如何修复?这是bug还是我的失败?

作曲家版本f85d965732d9505b69242a070dc0b381c9f6bbb

删除用户目录中的.composer文件夹。For me /home/noopic/.composer在两个目录中成功安装。

但是如果我在前端运行

composer update

相关内容

最新更新