Hi
I am getting following below error, when installing fresh installing Jigsaw.
Changed current directory to /Users/meetgodhani/.composer
Using version ^1.0 for tightenco/jigsaw
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove tightenco/collect v5.4.18
- Conclusion: don't install illuminate/support v5.4.19
- Installation request for tightenco/jigsaw ^1.0 -> satisfiable by tightenco/jigsaw[v1.0.0].
- Conclusion: don't install tightenco/collect v5.4.18
- tightenco/jigsaw v1.0.0 requires illuminate/support ^5.4 -> satisfiable by illuminate/support[v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.9].
- don't install illuminate/support v5.4.0|don't install tightenco/collect v5.4.18
- don't install illuminate/support v5.4.13|don't install tightenco/collect v5.4.18
- don't install illuminate/support v5.4.17|don't install tightenco/collect v5.4.18
- don't install illuminate/support v5.4.9|don't install tightenco/collect v5.4.18
- Installation request for tightenco/collect (locked at v5.4.18) -> satisfiable by tightenco/collect[v5.4.18].
Installation failed, reverting ./composer.json to its original content.
Try installing it locally to your project folder instead; check the docs here for instructions.
@damiani That works.
Having the same issue with global install (local works) & as I've seen multiple threads closed with the explanation "install locally", it would be nice to futher investigate the issue. Let me know if I can help by sending screenshots or additional data.
It seems the common thread when people have issues installing Jigsaw globally involves dependency conflicts between illuminate/support and tightenco/collect, which is a subset of illuminate/support. And the culprit in these cases is likely to be laravel/valet, which uses tightenco/collect. If tightenco/collect is installed first (i.e. through Valet), then installing anything subsequently (using require) that depends on illuminate/support (like Jigsaw does) will fail because of conflicts.
A possible solution, if you feel the need to install Jigsaw globally, is to reverse the order in which the conflicting packages are required. So, assuming you have laravel/valet installed, give this a shot...run these commands in order:
composer global remove laravel/valet
composer global require tightenco/jigsaw
composer global require laravel/valet
(If you don't have Valet installed, but something else that is the cause of the dependency conflict, target that package for step 1 remove/ step 3 require instead.)
Another option is to forego using require, and add the packages manually to your global composer.json file (located at ~/.composer/composer.json):
{
"require": {
"laravel/valet": "^2.0",
"tightenco/jigsaw": "^1.0"
}
}
...and then run composer update. This should work, regardless of what order the packages are listed in in composer.json.
Or, you could just install locally :) and avoid any potential conflicts with laravel/valet, or with any other packages you might have globally installed.
Keith hi,
this response is amazing and should be added to the docs. Thank you very much for a detailed description! I'll test it ASAP, but I'm sure it'll work. :)
Yes, please let me know if it works for you. We will be updating the docs shortly to clarify the installation procedure and include some troubleshooting steps.
Having the same issue with global install (local works) & as I've seen multiple threads closed with the explanation "install locally", it would be nice to futher investigate the issue. Let me know if I can help by sending screenshots or additional data.
Hey @morpheus7CS, there's not much to investigate here so to speak, it's just a limitation of how Composer handles globally installed packages in general.
Any time you install a package globally with Composer, it gets added to ~/.composer/composer.json. All the dependencies of all of your globally installed Composer packages live in the same ~/.composer/vendor directory.
That means none of your global packages are isolated from each other, and Composer will refuse to install a package if it's dependencies conflict with any of your other global packages, even though none of those packages were ever intended to be compatible.
Think of your global Composer packages as one big project. Every time you add a new global package, you are trying to add a new dependency to that project. Since none of these packages make any attempt to be compatible with each other (they have no idea what else you might be installing), you run into these conflicts all the time.
Another solution to the problem is to use this tool to install global dependencies instead of using Composer itself:
https://github.com/consolidation/cgr
It installs every global dependency in it's own isolated environment, so none of them need to be compatible with each other.
You can read more about this behavior in this issue over at the Composer repo:
@damiani Global installation worked after removing Valet & reinstalling it again after global installation of Jigsaw. Thanks!
Most helpful comment
It seems the common thread when people have issues installing Jigsaw globally involves dependency conflicts between
illuminate/supportandtightenco/collect, which is a subset ofilluminate/support. And the culprit in these cases is likely to belaravel/valet, which usestightenco/collect. Iftightenco/collectis installed first (i.e. through Valet), then installing anything subsequently (usingrequire) that depends onilluminate/support(like Jigsaw does) will fail because of conflicts.A possible solution, if you feel the need to install Jigsaw globally, is to reverse the order in which the conflicting packages are
required. So, assuming you havelaravel/valetinstalled, give this a shot...run these commands in order:(If you don't have Valet installed, but something else that is the cause of the dependency conflict, target that package for step 1
remove/ step 3requireinstead.)Another option is to forego using
require, and add the packages manually to your globalcomposer.jsonfile (located at~/.composer/composer.json):...and then run
composer update. This should work, regardless of what order the packages are listed in incomposer.json.Or, you could just install locally :) and avoid any potential conflicts with
laravel/valet, or with any other packages you might have globally installed.