Closed trianity closed 2 years ago
It sounds like you might currently have league/commonmark
2.0.0 installed, but the version of graham-campbell/markdown
you're trying to install is not compatible with 2.0.0. If you use the -W
flag as mentioned in the output, Composer will downgrade that package to a compatible version for you.
I have the same issue with a fresh Laravel install. Using -W doesn't work either.
`Your requirements could not be resolved to an installable set of packages.
Problem 1
It sounds like you might currently have
league/commonmark
2.0.0 installed, but the version ofgraham-campbell/markdown
you're trying to install is not compatible with 2.0.0. If you use the-W
flag as mentioned in the output, Composer will downgrade that package to a compatible version for you.
Hello, I tried to do it, but the Laravel 8 core has already installed league/commonmark
2.0.0.
The solution was to clone GrahamCampbell/Laravel-Markdown
, make offline package from it and correct the composer.json to use the proper league/commonmark
2.0.0.
same issue here.
am facing same issue
Hello, I tried to do it, but the Laravel 8 core has already installed
league/commonmark
2.0.0. The solution was to cloneGrahamCampbell/Laravel-Markdown
, make offline package from it and correct the composer.json to use the properleague/commonmark
2.0.0.
Hello, did it work to you? If it worked to you, can I know how to do it? I'm still new in using Laravel and I don't know how to install offline package in Laravel. I've tried something like this but it didn't work for me. Thank you.
Hello, I tried to do it, but the Laravel 8 core has already installed
league/commonmark
2.0.0. The solution was to cloneGrahamCampbell/Laravel-Markdown
, make offline package from it and correct the composer.json to use the properleague/commonmark
2.0.0.Hello, did it work to you? If it worked to you, can I know how to do it? I'm still new in using Laravel and I don't know how to install offline package in Laravel. I've tried something like this but it didn't work for me. Thank you.
"repositories": {
"local01": {
"type": "path",
"url": "packages/vendor-name/package-name"
}
},
"require": {
... all other required packages, and at the and: ...
"vendor-name/package-name": "*"
},
Hello, I tried to do it, but the Laravel 8 core has already installed
league/commonmark
2.0.0. The solution was to cloneGrahamCampbell/Laravel-Markdown
, make offline package from it and correct the composer.json to use the properleague/commonmark
2.0.0.Hello, did it work to you? If it worked to you, can I know how to do it? I'm still new in using Laravel and I don't know how to install offline package in Laravel. I've tried something like this but it didn't work for me. Thank you.
- Create a folder /packages/vendor-name/package-name
- In this folder setup your Laravel package (or copy of the mentioned package) Here you can find documentations: https://laravel.com/docs/8.x/packages Good tutorial with all necessary steps: https://devdojo.com/devdojo/how-to-create-a-laravel-package
- In your main Laravel composer.json file setup package access like this:
"repositories": { "local01": { "type": "path", "url": "packages/vendor-name/package-name" } }, "require": { ... all other required packages, and at the and: ... "vendor-name/package-name": "*" },
- After this setup you can modify the package. Don't forget to change the necessary name-space settings in all files of the package.
Hi, thank you for your response, but it is still an error for me that the class not found from config/app.php. Maybe I miss something, so I will try it later. Thank You very much once again.
Had the same problem, here is the workaround I found (not ideal, but simple):
Remove the composer lock file
rm composer.lock
Require the package
composer req graham-campbell/markdown:^13.1
Thank you everyone. This is an issue/limitation with composer. It is not smart enough to downgrade commonmark to allow installation of this package. The best thing to do for now is to add this package to your composer.json by hand and then run composer update. I will be releasing a new major version of this package soon, switching from commonmark v1 to v2, so stay tuned.
$ composer require graham-campbell/markdown:^13.1
./composer.json has been updated
Running composer update graham-campbell/markdown Loading composer repositories with package information
Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1
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.