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

robj's avatar
Level 9

vue NPM build deployment build error - Laravel Forge on Digital Ocean

Hi there, I'm deploying a vue application, with the built in Forge functionality, from Github to Digital ocean.

It is failing with the error (I've replaced the domain with XXXX) : ERROR Error: EACCES: permission denied, rmdir '/home/forge/XXXX/dist/assets'

My build script is: cd /home/forge/XXXX git pull origin $FORGE_SITE_BRANCH

npm install npm run build

When I npm run build from the command line it runs fine.

I have tried the solution proposed in a number of forums of sudo npm install -g --unsafe-perm however that hasn't helped.

Any ideas?

0 likes
4 replies
Romain's avatar

I believe there is a live messaging function on Forge's dashboard. Check out the bottom right of your screen. They can probably help you

1 like
robj's avatar
Level 9

Thanks Romain :) I hadn't noticed that! Thanks for pointing it out.

I'll update the thread with an answer once solved for anyone else that might come across this.

DonJones's avatar

@robj Could you share the outcome please? I'm having the same issue.

robj's avatar
Level 9

Hey @donjones - as I recall it was something to do with me deploying or updating once from the digital ocean console which runs as a different user to the forge user. Once I'd got that sorted, which was my fault in the first place, deploys from Forge were largely OK.

Hope that helps, RobJ.

Please or to participate in this conversation.