Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when "composer install" #2975

Closed
felixstoessel opened this issue Dec 5, 2020 · 7 comments
Closed

Error when "composer install" #2975

felixstoessel opened this issue Dec 5, 2020 · 7 comments

Comments

@felixstoessel
Copy link

felixstoessel commented Dec 5, 2020

Bug Description

I am unsure where to put this bug report. So the initial one, I posted here:
pixelfear/composer-dist-plugin#5

I am using a Statamic project (from the statamic/statamic repo). When deleting the vendor/ and composer.lock and trying to do a composer install, I get following error:

error

I am using Composer version 1.10.19 and also tested with Composer 2. I am on Homestead and macOS.

Here is my composer.json:

{
    "name": "statamic/statamic",
    "description": "Statamic",
    "keywords": ["statamic", "cms", "flat file", "laravel"],
    "type": "project",
    "require": {
        "php": "^7.3",
        "aryehraber/statamic-color-extractor": "^1.0",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.0",
        "laravel/tinker": "^2.0",
        "statamic/cms": "^3.0"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.5",
        "facade/ignition": "^2.3.6",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi",
            "@php artisan statamic:install --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}
@felixstoessel felixstoessel changed the title Error when "composer install" (initial project statamic/statamic) #5 Error when "composer install" Dec 5, 2020
@jonassiewertsen
Copy link
Contributor

Could you add your comopser.json as well?

@felixstoessel
Copy link
Author

@jonassiewertsen Added.

@duncanmcclean
Copy link
Member

I was able to use the composer.json file you provided just fine when running composer install.

Have you tried running Composer from outside of the Homestead box? I've known it to be funny with things like that. Also, when you upgraded Composer, I'm guessing you did that in the Homestead box and not you're local machine, right?

@felixstoessel
Copy link
Author

Yes, I am running those commands inside the VM/Homestead.

Well, it just worked somehow by doing following: composer install --no-scripts --no-plugins (from laravel/homestead#1240 (comment))

I just don't know why this issue only appears with my Statamic project...

@duncanmcclean
Copy link
Member

I think it's due to the pixelfear/composer-dist-plugin composer plugin that's used by the Statamic core. Essentially, it compiles the CSS & JS for releases instead of them needing to be in Git. For whatever reason, Homestead doesn't seem to like it after its run.

@felixstoessel
Copy link
Author

Yeah, I also thought that this plugin might be the root cause.

@jasonvarga
Copy link
Member

Closing as the issue isn't in Statamic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants