Jump to content

Recommended Posts

Posted (edited)

I am updating a client's website (1932washhouse.com). After I pushed the recent commit to github, it automatically passed the file updates to heliohost using a webhook. I have a composer.json file sitting in the httpdocs/ but I don't know how to do composer install to update the dependencies and install the new one I added?

I navigated to the PHP Composer option in the dashboard but it shows me this error notification: 

Quote

Could not load packages: the /.trash/owa/modules/base/composer.json file of the 1932washhouse.com domain is invalid. To fix the issue, click "Edit composer.json" and correct the composer.json syntax.

I tried clicking the change folder but it didn't show the option inside httpdocs/,  I also tried manually typing the content of composer.json file from httpdocs/ into that composer.json but it won't do.

Edited by b0chard
Posted

Fixed.

So this is a weird one. Composer broke because the composer.json that was loaded in Plesk was deleted (which is why the app folder was set to something in .trash). My guess is git moved the old versions to the trash when it updated them, breaking Composer.

I had to manually run a command as root to re-register httpdocs as the app folder for your composer, then switch it back for you in the UI. The old broken folders are still going to show as options as there is actually no way to remove them from the system short of manually editing composer's database. It now shows 2 up to date dependencies and 1 not installed.

If this is being caused by git deleting the composer.json, the unorthodox solution of committing the vendor folder to the git may very well be the best solution...

 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...