spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.75k stars 1.07k forks source link

Unable to Install MediaLibrary Pro #2193

Closed jongravois closed 3 years ago

jongravois commented 3 years ago

I apologize for my ignorance but I have been trying this since I purchased an unlimited license.

I had MediaLibrary 8 installed but wasn't using it so I uninstalled the 8. version and removed the table from my database along with the record in the migration table ... so, a fresh start, eh.

According to the docs

Media Library Pro is a paid add-on package for Laravel Media Library. In order to use it, you must have the base version of media library installed in your project. Here are the installation instructions for the base version.

Clicking that link takes me to the base installation where I am given two choices: [1] If you only use the base package issue this command with a command and [2] If you have a license for media library pro, you should use laravel-media-library-pro, so I run the second command composer require spatie/laravel-medialibrary-pro

I get this in the Terminal:

 [InvalidArgumentException]
  Could not find a matching version of package spatie/laravel-medialibrary-pro. Check the package spelling, your ver
  sion constraint and that the package is available in a stability which matches your minimum-stability (dev).

PLEASE HELP!!!

slzrdev commented 3 years ago

You must follow step by step the instructions provided and it will work. https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/installation

Also, you should post this issue in the Pro repository.

jongravois commented 3 years ago

I am trying to follow the instructions provided …

On that page you linked, the first paragraph states

Media Library Pro https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/medialibrary.pro is a paid add-on package for Laravel Media Library. In order to use it, you must have the base version of media library installed in your project. Here are the installation instructions for the base version https://spatie.be/docs/laravel-medialibrary/v9/installation-setup.

To me that implies I have to follow that like to continue given you must have the base version of media library installed. So following that link, I get to

If you have a license for media library pro, you should use laravel-media-library-pro

The command provided there is what is causing my error. composer require spatie/laravel-medialibrary-pro

On Nov 19, 2020, at 9:07 PM, slzrdev notifications@github.com wrote:

You must follow step by step the instructions provided and it will work. https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/installation https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/installation — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spatie/laravel-medialibrary/issues/2193#issuecomment-730816070, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUCCMIJRVS7XSDR5ZLEVJDSQXMONANCNFSM4T3WFQZQ.

freekmurze commented 3 years ago

Did you perform these steps? https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/installation#requiring-media-library-pro

If you think the wording, can be better, feel free to send a PR (there's a little edit button on top of every page).

jongravois commented 3 years ago

What confused me was the link to installing the base version right after the phrase "you must have the base version of media library installed”. By clicking that link, I was taken away from the actual instructions to allow me to install. I didn’t know until I ignored the link and kept reading that page that the base is installed with Media Library Pro … stupid me, but I thought I was following the correct procedure.

Given that, I installed the package successfully but am now struggling with the CSS installation because I don’t have a webpack.config.js file. But I will keep working on it.

PLEASE, if I sounded brash or disrespectful, accept my apology. I am a huge Spatie fan. Not only do I sponsor Spatie, but I have also purchased Laravel Package Training, Laravel Beyond Crud, Laravel Backup Server. So the last thing I want to do is come across as mean or hateful.

Thanks!!! Jon

On Nov 20, 2020, at 8:22 AM, Freek Van der Herten notifications@github.com wrote:

Did you perform these steps? https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/installation#requiring-media-library-pro https://spatie.be/docs/laravel-medialibrary/v9/handling-uploads-with-media-library-pro/installation#requiring-media-library-pro If you think the wording, can be better, feel free to send a PR (there's a little edit button on top of every page).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spatie/laravel-medialibrary/issues/2193#issuecomment-731198757, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUCCMMMEAMNUIG4NPF7ERTSQZ3SVANCNFSM4T3WFQZQ.

freekmurze commented 3 years ago

PLEASE, if I sounded brash or disrespectful, accept my apology. I am a huge Spatie fan. Not only do I sponsor Spatie, but I have also purchased Laravel Package Training, Laravel Beyond Crud, Laravel Backup Server. So the last thing I want to do is come across as mean or hateful.

No harm done, I didn't think that at all! Feel free to continue asking questions. And thanks for the support 👍

jongravois commented 3 years ago

Exactly which file do I put the following in? (LOL, I have never done anything with mix before other than what the installer does for me)

mix.override((webpackConfig) => { webpackConfig.resolve.modules = [ "node_modules", __dirname + "/vendor/spatie/laravel-medialibrary-pro/resources/js", ]; });

On Nov 20, 2020, at 8:37 AM, Freek Van der Herten notifications@github.com wrote:

PLEASE, if I sounded brash or disrespectful, accept my apology. I am a huge Spatie fan. Not only do I sponsor Spatie, but I have also purchased Laravel Package Training, Laravel Beyond Crud, Laravel Backup Server. So the last thing I want to do is come across as mean or hateful.

No harm done, I didn't think that at all! Feel free to continue asking questions. And thanks for the support 👍

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spatie/laravel-medialibrary/issues/2193#issuecomment-731207201, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUCCMKADT5ON47SVFFD3O3SQZ5LBANCNFSM4T3WFQZQ.

freekmurze commented 3 years ago

@AdrianMrn can you answer this one?

AdrianMrn commented 3 years ago

@jongravois That code goes in your webpack.mix.js file. You can see what that looks like over here: https://github.com/spatie/laravel-medialibrary-pro-app/blob/master/webpack.mix.js

If you're using a version of laravel-mix lower than 6 (6 is currently in beta, so if you only followed the install instructions, this is likely), you'll have to use this code instead:

mix.webpackConfig({
    resolve: {
        modules: [
            "node_modules",
            __dirname + "/vendor/spatie/laravel-medialibrary-pro/resources/js",
        ],
    },
});
ltd300 commented 2 years ago

I'm having the same issue as [jongravois] I bought the pro version, and it seems so simple but maybe I'm missing some package or something, do I need to install react? Let me show you after my installation and all the efort that I see. check picture below I have bootstrap 4 and Laravel 8, I have livewire installed and I'm adding the tailwind CSS as a CDN like alpine but still nothing

Screen Shot 2022-08-26 at 10 48 16 AM