• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Warning: The lock file... message on composer and laravel project install.

Yaniv Zahavi

New Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
Version 18.0.50
I'm hoping someone can help, been stuck here for a while.

I am having an issue installing a third party open source CRM using the Plesk Panel. I have tried different reputable open source CRM systems but i'm having the same or similar issue with all of them.

Running "validate" on composer comes up with a valid composer.json.

When I try to install the project I am getting a Warning message about the lock file not up to date following with the required packages "barryvdh/laravel-dompdf" not meeting a certain constraint. The message says this could happen when you manually edit the composer.json file or the composer files are incorrectly merged but I haven't touched the composer.json file and this is a new setup, everything is default after installing the Laravel Toolkit for the domain using Plesk.

I tried all sorts recommended resolutions I found online but none seem to do it.

The message I'm getting is:
Installing dependencies from lock file (including require-dev) Verifying lock file contents can be installed on current platform. Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update `. - Required package "barryvdh/laravel-dompdf" is in the lock file as "v2.0.0" but that does not satisfy your constraint "^1.0". This usually happens when composer files are incorrectly merged or the composer.json file is manually edited. Read more about correctly resolving merge conflicts Resolving merge conflicts - Composer and prefer using the "require" command over editing the composer.json file directly Command-line interface / Commands - Composer

Any suggestions?

I tried a few things including:
Composer update
Composer update --lock
Composer remove --unused

None of these did anything.
 

Attachments

  • laravelinstall.png
    laravelinstall.png
    91.6 KB · Views: 9
This is not a plesk thing this is a package thing with how the application is.

I was able to get it working on my end after a bit of trial and error. This is how I did it:

1) Wipe all the files for the domain/sub domain you're going to be using (assuming the domain you're using isn't actively being used.
2) Make your database, the user for the database, and the password, write this down in notepad to use later in the .env file.
3) Download the latest release source package.
4) Extract and upload the files to the server.
-- Mind you that you could probably do this with using git but meh, I downloaded the zip file for testing.
5) Once uploaded, update your document root path in the hosting setting for the domain/sub domain to be /public (so if you're using the root domain of, say, test.com, the current document root would just be / with the box empty, in that case you would just put public, otherwise just tag on /public).
6) On the left side under Server Management go to Laravel and click Scan so it'll find and attach the laravel application.
7) Log into your server via SSH and browse to your domain (make sure you are logged in as the system user for this. If you connect using your root admin. account you can switch to the system user account by using sudo su - user).
8) Issue the following commands:
Bash:
rm composer.lock
rm -rf vendor
composer install
9) Back in Plesk, navigate to your domain > PHP Composer and click "Update" follow by "Update" again.
10) Go back to the domain then to Manage Laravel Application.
11) Click the Edit button for "Environment variables (.env)" and edit add in your database details, SMTP details, app url, etc. Hit Update on the bottom left once done
12) Within the Laravel Application screen still, click on the Artisan tab and in the box next to "php artisan" type: krayin-crm:install
-- Note while ty ping this the option should appear, just choose that option so it's filled in
13) Click the little play button to the right of that.

And congrats, you just got it installed after a lot of jumping through hoops!
 
Last edited:
That was a fast response, I'm impressed :)
I haven't followed through your steps yet but it looks like you documented well. I will give it a go as soon as I can and let you know how it worked out.

thx.
 
Hi scsa20,

Thanks but I don't have an issue getting the project running when I'm manually uploading the files using the FTP, that works fine for me. I was trying to avoid that by installing the project directly from the vendor by running it on composer within Plesk:
create-project krayin/laravel-crm

I guess I can always use the FTP option but I was really trying to do it all from Plesk.

Sorry if I wasn't clear about it, I just figured I'm posting it on the Plesk forum so it would be assumed I'm trying to do it from Plesk but I can see how that might not be so obvious. I attached a screenshot showing exactly how I'm trying to run it from Plesk.
 

Attachments

  • CreateProject.png
    CreateProject.png
    7.1 KB · Views: 1
That won't work, if you want to follow the directions outlined in the github readme, then you will need to do it all through ssh as the user, otherwise the steps I've outlined above should work (you could also, technically, just clone the repo from github instead of uploading via FTP). But the way you're trying to do it after the failed laravel deployment is not going to work.
 
I am just wondering what you mean by "trying to do it after the failed Laravel deployment is not going to work."

I consider Laravel deployment as the Laravel environment on Plesk that gets created by default when you setup Laravel on the domain from Plesk but I don't have an issue with that, the deployment doesn't fail on me, what fails on me is creating the project from a third party after Laravel was deployed successfully from Plesk.

On the initial Laravel deployment a default Laravel page is created with all the Laravel files and seems to be working fine. Its when you try to bring in a different project files is when it fails unless you do it manually from FTP.

I'm not following the read me notes from GitHub to install the project but I am following the instructions from the project itself from the installation document. The instructions are fairly simple, not much to it and it doesn't matter which Project I'm trying to install from what vendor, the instructions are pretty much the same and all fail the same way within Plesk. I can do just about anything else so far with Plesk just not install a project with composer.
 
Back
Top