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!