Problem with every plugin install

Hello, everyone,

We have now tried everything, including updates, etc., but without success
No matter which plugin we get an error message over and over again … at first I thought it was the plugin, but I can now rule that out

The command “‘composer’ ‘require’ ‘poptin/poptin-plugin’ ‘–update-with-dependencies’” failed.

Exit Code: 2(Misuse of shell builtins)

Working directory: /home/domain/domain. com

Output:

Error Output:

Do not run Composer as root/super user! See getcomposer. org /root for details
Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist. com /deprecating-composer-1-support/
Info from repo.packagist.org: #StandWithUkraine
Using version dev-main for poptin/poptin-plugin
./composer.json has been updated
Loading composer repositories with package information
Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist. com/ deprecating-composer-1-support/
Info from repo.packagist. org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
  - The requested package poptin/poptin-plugin dev-main exists as poptin/poptin-plugin[dev-main] but these are rejected by your constraint.

Installation failed, reverting ./composer.json to its original content.

Do any of you know what could be causing this?

Thank you in advance for the help

try adjusting the plugin constraint to "dev-main". Looks like the version of poptin you have isn’t compatible with the constraint you have in place.

@artistro08
in the env or in the composer?

Composer file. Should look like this:

    "require": {
        ...
        "poptin/poptin-plugin": "dev-main",
        ...
    },

The command “‘composer’ ‘require’ ‘indikator/backend-plugin’ ‘–update-with-dependencies’” failed.

Exit Code: 1(General error)

Working directory:

Output:

Error Output:

In JsonFile.php line 317:

"./composer.json" does not contain valid JSON
Parse error on line 19:
...n": "dev-main",    },    "scripts": {
---------------------^
Expected: 'STRING' - It appears you have an extra trailing comma

If that’s the last line on your composer file in the require block, remove the comma.

The command “‘composer’ ‘require’ ‘indikator/backend-plugin’ ‘–update-with-dependencies’” failed.

Exit Code: 2(Misuse of shell builtins)

Working directory: ----

Output:

Error Output:

Key require is a duplicate in ./composer.json at line 21
Do not run Composer as root/super user! See https:// getcomposer .org/root for details
Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https:// blog.packagist. com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^1.6 for indikator/backend-plugin
./composer.json has been updated

Problem 1
  - The requested package poptin/poptin-plugin dev-main exists as poptin/poptin-plugin[dev-main] but these are rejected by your constraint.

Installation failed, reverting ./composer.json to its original content.

keeps coming

Hmm, looks like the constraint is somewhere else in your composer setup. Not sure how to fix this one unless I have the code.

{
    "name": "october/october",
    "description": "Built using October CMS: The Laravel-Based CMS Engineered For Simplicity",
    "type": "project",
    "homepage": "https://octobercms.com",
    "license": "proprietary",
    "require": {
        "php": ">=7.2.9",
        "october/rain": "^2.0",
        "laravel/framework": "^6.0",
        "october/all": "^2.0",
        "rainlab/blog-plugin": "^1.6",
        "martin/forms-plugin": "^1.5",
        "poptin/poptin-plugin": "dev-main"

    },
    "require-dev": {
        "phpunit/phpunit": "^8.0|^9.0"
    },

    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate --ansi"
        ],
        "post-autoload-dump": [
            "System\\Console\\ComposerScript::postAutoloadDump"
        ],
        "post-update-cmd": [
            "System\\Console\\ComposerScript::postUpdateCmd"
        ],
        "pre-package-uninstall": [
            "System\\Console\\ComposerScript::prePackageUninstall"
        ],
        "test": [
            "phpunit --stop-on-failure"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "allow-plugins": {
            "composer/installers": true
        }
    },
    "autoload": {
        "psr-4": {
            "System\\Console\\": "modules/system/console"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "repositories": {
        "octobercms": {
            "type": "composer",
            "url": "https://gateway.octobercms.com"
        }
    }
}

i would back up your composer file, remove all plugins from your composer file, remove plugins in the directory, and go from there.

I’ve already tried it with a completely new insert but it also happens there

Well, another thing too. Composer is being run as root, and that’s a HUGE no no. Maybe try and see if the file permissions are correct. That would mess up a ton of stuff.

That’s right, I just looked, but I didn’t have time until all the changes were made, everything worked before

I was able to install this by doing the following:

  1. php artisan project:set <LICENSE KEY>
  2. php artisan plugin:install poptin.poptin
Installing Plugin: poptin.poptin
Executing: composer require poptin/poptin-plugin

...

 [OK] Plugin 'poptin.poptin' installed

Tested using October CMS v2.2 and v3.0

1 Like

@daft

Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist. com/deprecating-composer-1-support/
Info from repo.packagist. org: #StandWithUkraine
Using version dev-main for poptin/poptin-plugin
./composer.json has been updated
Loading composer repositories with package information
Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist. com/deprecating-composer-1-support/
Info from repo.packagist. org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package poptin/poptin-plugin dev-main exists as poptin/poptin-plugin[dev-main] but these are rejected by your constraint.

Installation failed, reverting ./composer.json to its original content.

In Process.php line 269:

The command “‘composer’ ‘require’ ‘poptin/poptin-plugin’ ‘–update-with-dependencies’” failed.

Exit Code: 2(Misuse of shell builtins)

Working directory: …

Output:

Error Output:

Do not run Composer as root/super user! See How do I install untrusted packages safely? Is it safe to run Composer as superuser or root? - Composer for details
Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist. com/ deprecating-composer-1-support/
Info from repo.packagist. org: #StandWithUkraine
Using version dev-main for poptin/poptin-plugin
./composer.json has been updated
Loading composer repositories with package information
Warning from repo.packagist. org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See blog.packagist. com/deprecating-composer-1-support/
Info from repo.packagist. org: #StandWithUkraine
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
  - The requested package poptin/poptin-plugin dev-main exists as poptin/poptin-plugin[dev-main] but these are rejected by your constraint.

Installation failed, reverting ./composer.json to its original content.

That didn’t help either, the problem persists

The first line gives a hint. Looks like you’ll need to upgrade to Composer 2. Composer 1 has limited support and uses canonical repositories.