ERROR Deployer not found: github #1040

Closed
scaljeri opened this Issue Feb 8, 2015 · 44 comments

Projects

None yet
@scaljeri
scaljeri commented Feb 8, 2015

I just download install Hexo version 3.0.0-rc.2

Now I've setup the deploy section in the _config.yml:

# Deployment
## Docs: http://hexo.io/docs/deployment.html
deploy:
  type: github
  repo: https://github.com/scaljeri/website.git
  branch: gh-pages
  message: hexo deploy

However, when I run the deploy command I get the following:

% hexo deploy
ERROR Deployer not found: github

According to the documentation it should work this way. Any suggestions ?

@Xuanwo
Member
Xuanwo commented Feb 8, 2015
@scaljeri
scaljeri commented Feb 8, 2015

#1013 seems to be about an upgrade from 2.x to 3.0. I simply downloaded 3.0.0-rc.2 and created a new project.

So, should the github deployer be downloaded manually ?

@Xuanwo
Member
Xuanwo commented Feb 8, 2015

In version 3, your should use git instead of github.
And your need to run

npm install hexo-deployer-git --save

So that you can use hexo-deployer-git as usual.

@scaljeri
scaljeri commented Feb 8, 2015

Thanks for helping. I noticed that hexo doesn't have a deploy option anymore. Also on the hexo-deployer-git repo itself is not much information on how to run the command now. Any help would be appreciated

@Xuanwo
Member
Xuanwo commented Feb 8, 2015

you can modify your _config.yml

@scaljeri
scaljeri commented Feb 8, 2015

I did as you said:

deploy:
  type: git
  repo: https://github.com/scaljeri/website.git
  branch: gh-pages
  message: hexo deploy

But now what. If I look at the options of hexo

% hexo --help
Usage: hexo <command>

Commands:
  help      Get help on a command.
  init      Create a new Hexo folder.
  migrate   Migrate your site from other system to Hexo.
  render    Render files with renderer plugins.
  version   Display version information.

Global Options:
  --config   Specify config file instead of using _config.yml
  --debug    Display all verbose messages in the terminal
  --draft    Display draft posts
  --safe     Disable all plugins and scripts
  --silent   Hide output on console

I don't see the deploy options ?

@Xuanwo
Member
Xuanwo commented Feb 8, 2015

your work is done.
all the thing about depoly is set in _config.yml

@scaljeri
scaljeri commented Feb 8, 2015

Ok, thnx. I'll wait until hexo CLI supports it again!

@Xuanwo
Member
Xuanwo commented Feb 8, 2015

Why you need this option?

@scaljeri
scaljeri commented Feb 8, 2015

So it does the deployment. It should push it to my github repo. Before I did it like this

hexo deploy -m "Commit message"
@Xuanwo
Member
Xuanwo commented Feb 9, 2015

OK, I get your problom finally.
your problem is the floder is not a hexo floder.

pleasw read https://github.com/hexojs/hexo/wiki/Migrating-from-2.x-to-3.0#modify-packagejson
I'm sorry for my mistake, it is for rc.3.
in rc.2 , the quickist way is to create a new floder, and run hexo init, and copy your source file in it.

@scaljeri
scaljeri commented Feb 9, 2015

I've updated hexo to 3.0.0-rc.3 and followed these instructions: https://github.com/hexojs/hexo/wiki/Migrating-from-2.x-to-3.0#modify-packagejson

Now I have the following issue

% hexo server
[error] TypeError: Cannot read property 'config' of undefined
TypeError: Cannot read property 'config' of undefined
    at module.exports (/Users/me/dev/website/node_modules/hexo-server/lib/server.js:13:20)
....
@Xuanwo
Member
Xuanwo commented Feb 9, 2015

you need to run all of them

npm install hexo-generator-index --save
npm install hexo-generator-archive --save
npm install hexo-generator-category --save
npm install hexo-generator-tag --save
npm install hexo-server --save
npm install hexo-deployer-git --save
npm install hexo-renderer-marked@0.2 --save
npm install hexo-renderer-stylus@0.2 --save
npm install hexo-generator-feed@1 --save
npm install hexo-generator-sitemap@1 --save
@scaljeri
scaljeri commented Feb 9, 2015

I did all of these (and I did it again :) Anyway, I get the same error message again. I tried to create a new project

$> hexo init blog
[error] Error: Theme phase does not exist.
Error: Theme phase does not exist.
....

How do you add themes to hexo itself, because so far i only added themes to the project itself ?

UPDATE: I get the same error when I install hexo with npm install hexo

@Xuanwo
Member
Xuanwo commented Feb 9, 2015

you should run

npm install hexo -g

instead of

npm install hexo

And try hexo init instead of hexo init blog

@scaljeri
scaljeri commented Feb 9, 2015

I did use the -g options, but I still get the same error

 % hexo init
[error] Error: Theme phase does not exist.
Error: Theme phase does not exist.
@Xuanwo
Member
Xuanwo commented Feb 9, 2015

change theme to landscape.

@scaljeri
scaljeri commented Feb 9, 2015

While searching for landscape I noticed I had a _config.yml in my homedir :(

Now everything seems to work fine until I fire-up the browser. In the browser I see the following:

<%- partial('_partial/head') %>
<%- partial('_partial/header', null, {cache: !config.relative_link}) %>
<%- body %>
<% if (theme.sidebar && theme.sidebar !== 'bottom'){ %> <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %> <% } %>
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %>
<%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> <%- partial('_partial/after-footer') %>

Should I install more packages ?

@Xuanwo
Member
Xuanwo commented Feb 9, 2015

run npm install hexo-renderer-ejs --save maybe.

@scaljeri
scaljeri commented Feb 9, 2015

That did the trick!! Now it works in the browser and if I deploy it to github it looks fine too: http://scaljeri.github.io/website/

Thanks a lot!

@Xuanwo
Member
Xuanwo commented Feb 9, 2015

Thanks god. =。=

@scaljeri scaljeri closed this Feb 9, 2015
@jiaominlong

type: github to type: git

@addcn addcn added a commit to addcn/addcn.github.com that referenced this issue Mar 5, 2015
@addcn addcn npm install hexo-deployer-git --save,见hexojs/hexo#1040 bcbfe65
@xd314697475

I have faced the same problem ,what should I do to solve it.

@ghost
ghost commented Mar 8, 2015

The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d

That's not simple . Hope author change it.

@junyang0456

Hi guys, I got a problem here after I update hexo. I move all my posts away, the test.md is a new post I just created. It seems something wrong with node_modules? :
[error] 13:23:33.684 HexoError: Process failed: _posts/test.md
TypeError: Cannot read property 'config' of null
at module.exports (/home/caffrey/blog/node_modules/hexo-renderer-marked/lib/renderer.js:55:10)
at /usr/local/lib/node_modules/hexo/lib/extend/renderer.js:78:38
at b (domain.js:183:18)
at Domain.run (domain.js:123:23)
at store.(anonymous function) (/usr/local/lib/node_modules/hexo/lib/extend/renderer.js:77:9)
at /usr/local/lib/node_modules/hexo/lib/core/render.js:96:9
at fn (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:641:34)
at Object._onImmediate (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:557:34)
at processImmediate as _immediateCallback

@junyang0456

The error is from "hexo g" command...

@Noel-bk
Noel-bk commented Mar 10, 2015

Thank you, Xuanwo :)
After using git instead of github, it works well !!

@Xuanwo
Member
Xuanwo commented Mar 11, 2015

@UnnamedSong Very happy that I can help you~

@GeneBlue

thanks everyone , i get my help from here!

@iamhankai

The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d

That's all right!

@iqiancheng

The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d

That's all right!

@Beenking

@iqiangcheng thanks

@non-player

按照一下操作 确实解决了:
执行完以后,如果报错 Error: Deployer not found : github,则执行如下命令:

npm install hexo-deployer-git --save

同时修改 _config.yml :

deploy:
type: git //改成github
然后再执行:

hexo generate

hexo deploy

@iamwent
iamwent commented Jun 4, 2015

I have installed the hexo-deployer-git ,but the error still exist.
ERROR Deployer not found: git

@Xuanwo
Member
Xuanwo commented Jun 5, 2015

Are you sure your command is npm install hexo-deployer-git --save instead of npm install hexo-deployer-git?
And are you sure you install this in your hexo dictory?

@iamwent
iamwent commented Jun 5, 2015

Success!
I installed the hexo-deployer-git through the command ,but not the hexo dictory(hexo init dir).
Thank you very much!@Xuanwo

@xumeng
xumeng commented Jul 21, 2015

@illusionworld thx

@zgpeace
zgpeace commented Oct 24, 2015

The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d

it works

@Zhangzijing

报错
$ npm install hexo-deployer-git --save
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported

@wxsbd2010

how to solve this err?
$ npm install hexo-generator-feed --saved
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported
hexo-site@0.0.0 E:\hexo
└── hexo-generator-feed@1.0.3

@xinpan2
xinpan2 commented Mar 6, 2016

well,when i was generating the sitemap ,i update the hexo/_config.yml by adding plugins:- hexo-generator-sitemap in the last of the file and the error araising later.

As soon as i deleted what i have added the error away.

@xiaozefeng

you should change
type: github to type: git with _config.yml

@ERICWUYU

The solution:
1: type change git
2: command npm install hexo-deployer-git --save
3: hexo d

That's all right!

@shizhonghai
shizhonghai commented Dec 8, 2016 edited

这个插件得安装
$ npm install hexo-deployer-git --save

然后操作如下
_config.yml 配置如下:
deploy:
type: git
repo: git@github.com:youname/yourname.github.io.git
branch: master
message:

我就是这样配置才解决这个问题的(ERROR Deployer not found: github),这是官网文档的部署配置

@NoahDragon NoahDragon locked and limited conversation to collaborators Dec 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.