Self-hosted ghost on Digital Ocean Droplet. I’m trying to update the Ghost CLI but I am receiving the following error:
/var/www/ghost$ sudo npm install -g ghost-cli@latest
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/lib/node_modules/ghost-cli
npm ERR! dest /usr/lib/node_modules/.ghost-cli-no3HtXlj
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/lib/node_modules/ghost-cli' -> '/usr/lib/node_modules/.ghost-cli-no3HtXlj'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ghost-mgr/.npm/_logs/2021-08-27T22_33_03_748Z-debug.log
I tried renaming ‘/usr/lib/node_modules/ghost-cli’ to ‘/usr/lib/node_modules/.ghost-cli-no3HtXlj’ as it says, but that did not work. Now I cannot rename the folder back to ‘ghost-cli’ and I still receive the error.
Does anyone know how to resolve this issue? I would very much appreciate any help!
Hello there, I still get this problem at each update, I need to manually delete Ghost CLI to be able to update.
It quite time consuming. I do not find the solution to this problem. How did you solve it ?
I still have the problem too and although I have mentioned it several times to the Ghost team, no one has answered me and no one has investigated this bug which affects several people who host at Digital Ocean.
How can we make sure that our problem is taken into account?
I just tried doing my first update after a DO backup. My update was from Ghost 5.2 to the latest 5.33. I had some dependencies problem before doing the update, but solved with Ghost-Doctor.
The update went smoothly without the aforementioned problems. Maybe it’s because I setup my droplet with the swap? We’ll never know.
To update the droplet is not enough to:
sudo -i -u ghost-mgr.
First I need to go in the Ghost folder:
cd /var/www/ghost/
Only after that I can start checking the update and updating thanks to ghost-help.