Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

niho's avatar
Level 2

Runtime Exception Deploying To Forge

Hello

Everytime I deploy to my server using laravelforge I am getting a runtime exception

Updating 8daea10..c251d94
Fast-forward
 composer.lock                                      | 74 +++++++++++-----------
 ..._113253_add_image_column_to_templates_table.php |  2 +-
 2 files changed, 38 insertions(+), 38 deletions(-)
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 30 removals
  - Removing symfony/dom-crawler (v3.1.10)

                                                                                         
  [RuntimeException]                                                                     
  Could not delete /home/forge/byd/vendor/symfony/dom-crawler/.gitignore:   
              

How can i solve this?

I get similar with composer.lock every so often and i just rm composer.lock but all of a sudden it is doing this?

Any help appreciated!

Thanks

0 likes
2 replies
ejdelmonico's avatar

@niho Was this server created with Forge? The reason I ask is it seems like a permissions problem. Most everything on a Forge server is done with the forge user. The forge user created when the server is provisioned has the permissions to do what is required of it.

niho's avatar
niho
OP
Best Answer
Level 2

Hi @ejdelmonico,

Thanks for responding. It did point to having a permissions issue but the server was actually created in forge and had worked fine before then other than having an constant issue with updating vendor dependencies and the occasional composer.lock issues.

In the end to solve this I deleted the site and recreated it on the same server with the same repo via forge and now its working like a dream and it has even solved previous issues I had when automatically deploying.

Cant be sure why this is but for anyone having similar issues a quick recreation of the site seemed to have solved this error.

Thanks

Nick

Please or to participate in this conversation.