satis icon indicating copy to clipboard operation
satis copied to clipboard

Alpha1 - Build return error "[UnexpectedValueException] Unknown package has no name defined"

Open Sartoric opened this issue 4 years ago • 1 comments

Hi all I've got this problem after (wrongly) run composer update

Quick recap I had a working satis on an internal server that is still running php 5.4, that cannot be updated atm. Yesterday I wrongly run composer update and of course satis was not working anymore.

I managed to recover the "old" composer.lock to run a composer install, but I started having the issue in subject.

I've tried to install a new satis environment using alpha1 composer create-project composer/satis:1.0.0-alpha1 and the same configuration-file used in the past (nothing changed in it)

I've found this https://github.com/composer/composer/pull/1899 but I can't relate it to my issue. I'm almost sure that I'm missing something stupid, some dependencies that was updated, something using wrong/newer version, but I can't find what. Does anyone have any clue ?

Tnx

Below the configuration-file and the composer.json from the fresh install

{
    "name": "TEST",
    "homepage": "https://test.test.it",

    "repositories": [
        { "type": "vcs", "url": "https://git.test.it/plesk-git/my-package/"},
        { "type": "composer", "url": "https://packagist.org" }
    ],
    "archive": {
        "directory": "packages",
        "format": "zip",
        "prefix-url": "https://test.test.it",
    },
    "require": {
        "test/my-package": "*"
    },
    "require-dependencies": false,
    "config": {
        "preferred-install": "dist"
     }
}

{
    "name": "composer/satis",
    "description": "Simple Repository Generator",
    "keywords": ["package", "repository", "generator"],
    "homepage": "https://github.com/composer/satis",
    "type": "library",
    "license": "MIT",
    "authors": [
        {
            "name": "Jordi Boggiano",
            "email": "[email protected]",
            "homepage": "http://seld.be"
        },
	{
            "name": "Nils Adermann",
            "email": "[email protected]",
            "homepage": "http://www.naderman.de"
        }
    ],
    "bin": ["bin/satis"],
    "require": {
        "php": ">=5.3.2",
        "composer/composer": "1.0.*@dev",
        "twig/twig": "~1.7",
        "symfony/console": "~2.1"
    },
    "autoload": {
        "psr-0": { "Composer\\Satis": "src/" }
    }
}

Sartoric avatar Jun 02 '20 14:06 Sartoric

For me it was simply because the satis build script used the vendor/composer/installed.json file of whatever project's folder I was currently in, instead of its own. I think it happened after upgrading to composer 2, so some projects were using the structure of composer 1 and some of composer 2. Running the build script from some other folder or updating all projects (including satis) with composer 2 seemed to do the trick.

bjoern-tantau avatar Apr 19 '21 13:04 bjoern-tantau