[Bug] hexo server Fails After Cloning hexo-theme-icarus

Author: hy0210Created Feb 8, 2025Updated Feb 20, 2025
Labelsbug:core

Describe the bug I followed the installation steps in "Getting Started with Icarus," but encountered an error when running hexo server. The server fails to start due to missing modules.

System and Environment

  • Hexo Version: 7.3.0
  • Operating System: macOS 13.5
  • Node.js Version: v20.11.1

To Reproduce

  1. Install Hexo CLI globally.
  2. Initialize a new Hexo project:
bash
hexo init hexo-0208-3
cd hexo-0208-3
npm install
  1. Initialize a Git repository:
bash
git init
  1. Clone Icarus theme from source:
bash
git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus --depth 1
  1. Set Hexo theme to Icarus:
hexo config theme icarus
  1. Start the Hexo server:
hexo server

Observed Behavior

The following error appears in the console:

ERROR Script load failed: themes/icarus/scripts/index.js
Error: Cannot find module 'semver'

(Screenshot attached below)

Expected behavior The Hexo server should start successfully and serve the default Icarus theme home page.

Screenshots

  1. Console Error Message
Image
  1. http://localhost:4000 Output
Image

Any help on fixing this issue would be greatly appreciated. Thanks!

Source: ppoffice/hexo-theme-icarus