1

When I try to run hexo init in Git Bash in Windows10, it fail and show following :

    INFO  Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
fatal: unable to access 'https://github.com/hexojs/hexo-starter.git/': Failed to connect to localhost port 1080: Connection refused
WARN  git clone failed. Copying data instead
FATAL {
  err: [Error: ENOENT: no such file or directory, scandir 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\hexo-cli\assets'] {
    errno: -4058,
    code: 'ENOENT',
    syscall: 'scandir',
    path: 'C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\hexo-cli\\assets'
  }
} Something's wrong. Maybe you can find the solution here: %s http://hexo.io/docs/troubleshooting.html

How does it happen and how do we solve it?

Adi Prasetyo
  • 1,006
  • 1
  • 15
  • 41
Jack Smith
  • 11
  • 1

2 Answers2

1

I had the issue too. Tried again after a few minutes it worked. It due to bad access to github.com from China.

Henry
  • 1,077
  • 1
  • 16
  • 41
0

Try to run the same command from powershell non admin. If it does not work, try npx hexo init

Tomap
  • 610
  • 8
  • 22