duncanmcclean / simple-commerce

A simple, yet powerful e-commerce addon for Statamic.
https://statamic.com/simple-commerce
Other
143 stars 34 forks source link

Error with installation #1074

Closed Aquive closed 1 month ago

Aquive commented 1 month ago

Description

I am trying to do a clean install with below command from docs.

statamic new my-site duncanmcclean/sc-starter-kit

I get the following error;

User roles cleared successfully.
Blueprints cleared successfully.
Fieldsets cleared successfully.
Views cleared successfully.
Statamic configs reset successfully.
./composer.json has been updated
Running composer update duncanmcclean/simple-commerce --with-dependencies
Loading composer repositories with package information
Dependency laravel/framework is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Dependency statamic/cms is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies.
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - stillat/proteus v3.0.0 requires nikic/php-parser ^4.10.3 -> found nikic/php-parser[v4.10.3, ..., 4.x-dev] but these were not loaded, likely because it conflicts with another require.
    - duncanmcclean/simple-commerce[v7.0.0, ..., 7.x-dev] require stillat/proteus ^3.0 -> satisfiable by stillat/proteus[v3.0.0].
    - Root composer.json requires duncanmcclean/simple-commerce ^7.0 -> satisfiable by duncanmcclean/simple-commerce[v7.0.0, v7.0.1, 7.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Cannot install due to dependency conflict.

In NewCommand.php line 555:

  There was a problem installing Statamic with the chosen starter kit!  

new [--dev] [--license [LICENSE]] [--local] [--with-config] [--without-dependencies] [-f|--force] [--] <name> [<starter-kit>]

Steps to reproduce

New installation with: statamic new my-site duncanmcclean/sc-starter-kit

Environment

duncanmcclean commented 1 month ago

It looks like one of Simple Commerce's dependencies (stillat/proteus) isn't yet compatible with nikic/php-parser v5, which PHPUnit 11 requires.

You might be able to workaround this by....

  1. Creating a fresh Statamic project without using the Simple Commerce Starter Kit
  2. In the composer.json file, downgrade from PHPUnit 11 to 10:

    "phpunit/phpunit": "^10.0",
  3. Then, install the Simple Commerce Starter Kit into your existing app:
    php please starter-kit:install duncanmcclean/sc-starter-kit

Related: https://github.com/Stillat/proteus/issues/33

github-actions[bot] commented 1 month ago

Released as part of v7.1.0.

duncanmcclean commented 1 month ago

This should be fixed now.