Ghost Node 업그레이드 문제
우분투 2020 LTS의 기본 Node.js가 14.x까지였었는데 Ghost 5.x에서 Node.js 16-20으로 올라가는 바람에 Ghost 업데이트를 하고 나서 문제가 생기기 시작했다. 처음에는 그냥 nvm으로 node.js 18을 올리고 default alias로 만들어서 해결했던 것 같은데 이후에 Ghost 업데이트를 하고 시작할 때 뭔가 꼬이기 시작했다. 대략 "시작하는 node.js는 20.x인데 systemd에 등록된 node는 지원되는 버전이 아닌데요!" 같은 문제였다.
✔ Checking system Node.js version - found v20.18.1
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_locustspectre-name
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
Warning: Ghost is running with node v16.20.2.
Your current node version is v20.18.1.
✖ Checking systemd node version - found v16.20.2
One or more errors occurred.
1) SystemError
Message: Ghost v5.105.0 is not compatible with Node v16.20.2
Help: Check the version of Node configured in /lib/systemd/system/ghost_locustspectre-name.service and update it to a compatible version
Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v20.18.1
Ghost Version: 5.105.0
Ghost-CLI Version: 1.26.1
Environment: production
Command: 'ghost doctor'
찾아보니 대략적으로 "Ghost는 설치/업데이트 시 node.js 버전을 물고 가니 nvm이나 n을 쓴다면 이러이러한 점을 확인하세요"라는 가이드[1]가 있었고 마침내 블로그를 거의 1년만에 부활시킬 수 있었다(...)