Giter Club home page Giter Club logo

Comments (10)

bastinald avatar bastinald commented on August 17, 2024 1

same issue here.

from laravel-markdown.

colinodell avatar colinodell commented on August 17, 2024

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.

from laravel-markdown.

raysn0w avatar raysn0w commented on August 17, 2024

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
- Root composer.json requires laravel/framework ^8.40, found laravel/framework[v8.40.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- laravel/tinker is locked to version v2.6.1 and an update of this package was not requested.
- laravel/tinker v2.6.1 requires illuminate/console ^6.0|^7.0|^8.0 -> found illuminate/console[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because
it conflicts with another require.
Problem 3
- laravel/sail is locked to version v1.9.0 and an update of this package was not requested.
- laravel/sail v1.9.0 requires illuminate/console ^8.0|^9.0 -> found illuminate/console[dev-master, v8.0.0, ..., 8.x-dev, 9.x-dev (alias of dev-master)] but these were not loaded, likely because it conf
licts with another require.
`

from laravel-markdown.

trianity avatar trianity commented on August 17, 2024

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.

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.

from laravel-markdown.

subtain-haider avatar subtain-haider commented on August 17, 2024

am facing same issue

from laravel-markdown.

888op avatar 888op commented on August 17, 2024

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.

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.

from laravel-markdown.

trianity avatar trianity commented on August 17, 2024

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.

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.

  1. Create a folder /packages/vendor-name/package-name
  2. 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
  3. 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": "*"
    },
  1. After this setup you can modify the package. Don't forget to change the necessary name-space settings in all files of the package.

from laravel-markdown.

888op avatar 888op commented on August 17, 2024

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.

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.

  1. Create a folder /packages/vendor-name/package-name
  2. 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
  3. 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": "*"
    },
  1. 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.

from laravel-markdown.

yannoff avatar yannoff commented on August 17, 2024

Had the same problem, here is the workaround I found (not ideal, but simple):

  1. Remove the composer lock file

    rm composer.lock
  2. Require the package

    composer req graham-campbell/markdown:^13.1

from laravel-markdown.

GrahamCampbell avatar GrahamCampbell commented on August 17, 2024

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.

from laravel-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.