NIT-Administrative-Systems / dynamic-forms

Dynamic Forms for Laravel
https://nit-administrative-systems.github.io/dynamic-forms/
MIT License
39 stars 19 forks source link

Cannot install on fresh Laravel 11 project #455

Closed 77media-creations closed 6 months ago

77media-creations commented 6 months ago

Describe the bug Installed a fresh Laravel 11.7.0 to test the package but it did not install, following is a composer error message:

Problem 1
    - Root composer.json requires northwestern-sysdev/dynamic-forms ^1.0 -> satisfiable by northwestern-sysdev/dynamic-forms[v1.0.0].
    - northwestern-sysdev/dynamic-forms v1.0.0 requires nesbot/carbon ^2 -> found nesbot/carbon[2.0.0, ..., 2.72.3] but the package is fixed to 3.3.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require northwestern-sysdev/dynamic-forms:*" to figure out if any version is installable, or "composer require northwestern-sysdev/dynamic-forms:^2.1" if you know which you need.

As suggested by the composer, I tried with -W flag and got the following error:

Problem 1
    - northwestern-sysdev/lodash-php v1.0.0 requires sebastian/comparator ^1.2 | ^2.0 | ^2.1 | ^3.0 | ^4.0 -> found sebastian/comparator[1.2.0, ..., 1.2.4, 2.0.0, ..., 2.1.3, 3.0.0, ..., 3.0.5, 4.0.0, ..., 4.0.8] but these were not loaded, likely because it conflicts with another require.
    - northwestern-sysdev/lodash-php v1.1.0 requires sebastian/comparator ^1.2 | ^2.0 | ^2.1 | ^3.0 | ^4.0 | ^5.0 -> found sebastian/comparator[1.2.0, ..., 1.2.4, 2.0.0, ..., 2.1.3, 3.0.0, ..., 3.0.5, 4.0.0, ..., 4.0.8, 5.0.0, 5.0.1] but these were not loaded, likely because it conflicts with another require.
    - northwestern-sysdev/dynamic-forms v1.0.0 requires northwestern-sysdev/lodash-php ^1.0.0 -> satisfiable by northwestern-sysdev/lodash-php[v1.0.0, v1.1.0].
    - Root composer.json requires northwestern-sysdev/dynamic-forms ^1.0 -> satisfiable by northwestern-sysdev/dynamic-forms[v1.0.0].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require northwestern-sysdev/dynamic-forms:*" to figure out if any version is installable, or "composer require northwestern-sysdev/dynamic-forms:^2.1" if you know which you need.

To Reproduce

  1. Install a fresh Laravel project composer create-project laravel/laravel dynamic-form
  2. Go into the directory and install composer dependencies composer install
  3. Install npm npm install
  4. Install the dynamic-forms package as per the docs composer require northwestern-sysdev/dynamic-forms
  5. And it runs into the error above.

Expected behavior The package should be installed as there are prerequisites fulfilled as per the docs.

**Have you customized the resources/js/formio/defaults.js` file?

Additional context Add any other context about the problem here.

nie7321 commented 6 months ago

I think this'll be fixed by https://github.com/NIT-Administrative-Systems/dynamic-forms/pull/450 -- stay tuned, I'll tag a new release later today!