🪐How to install Ghost locally
⭐Install Ghost-CLI
npm install ghost-cli@latest -g
⭐Install Ghost
ghost install local
⭐Starting & Stopping
ghost stop to stop Ghost
ghost start to start Ghost
ghost log views logs
ghost ls to list all running Ghost blogs
🔥可能的问题 ↓
①安装完Ghost后无法启动
提示缺少 sqlite3 ,解决办法:先安装 node-gyp ,再安装 sqlite3
npm install -g node-gyp
npm install sqlite3
https://blog.csdn.net/g17271807170/article/details/138475392
②新建文章,无法上传图片
原因是 sharp 库没有被安装,于是安装好sharp库
npm install sharp
npm ls sharp
https://blog.csdn.net/Trouble_Im_in/article/details/144332748
✅Supported Node versions
Supported Node versions
Version | Support Level |
---|---|
17.x and below | Unsupported |
18.x (Node v18 Hydrogen LTS) | Supported |
19.x | Unsupported |
20.x (Node v20 Iron LTS) | Recommended |
21.x | Unsupported |
22.x (Node v22 Jod LTS) | Supported |
23.x and above | Unsupported |
Node compatibility matrix
https://ghost.org/docs/faq/node-versions/