Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Deployer not found: github #1040

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

Comments

@scaljeri
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2015

@scaljeri

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2015

you can modify your _config.yml

@scaljeri

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2015

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

@scaljeri

This comment has been minimized.

Copy link
Author

commented Feb 8, 2015

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

@Xuanwo

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2015

Why you need this option?

@scaljeri

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Feb 9, 2015

change theme to landscape.

@scaljeri

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Feb 9, 2015

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

@scaljeri

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Contributor

commented Feb 9, 2015

Thanks god. =。=

@scaljeri scaljeri closed this Feb 9, 2015

@jiaominlong

This comment has been minimized.

Copy link

commented Mar 3, 2015

type: github to type: git

addcn added a commit to addcn/addcn.github.com that referenced this issue Mar 5, 2015
@xd314697475

This comment has been minimized.

Copy link

commented Mar 7, 2015

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

@ghost

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Mar 9, 2015

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

This comment has been minimized.

Copy link

commented Mar 9, 2015

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

@Noel-bk

This comment has been minimized.

Copy link

commented Mar 10, 2015

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

@Xuanwo

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2015

@unnamedsong Very happy that I can help you~

@GeneBlue

This comment has been minimized.

Copy link

commented Mar 26, 2015

thanks everyone , i get my help from here!

@iamhankai

This comment has been minimized.

Copy link

commented Apr 4, 2015

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

That's all right!

1 similar comment
@iqiancheng

This comment has been minimized.

Copy link

commented Apr 7, 2015

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

That's all right!

@Beenking

This comment has been minimized.

Copy link

commented May 11, 2015

@iqiangcheng thanks

@xlyren

This comment has been minimized.

Copy link

commented May 23, 2015

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

npm install hexo-deployer-git --save

同时修改 _config.yml :

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

hexo generate

hexo deploy

@iamwent

This comment has been minimized.

Copy link

commented Jun 4, 2015

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

@Xuanwo

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jul 21, 2015

@zgpeace

This comment has been minimized.

Copy link

commented Oct 24, 2015

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

it works

@Zhangzijing

This comment has been minimized.

Copy link

commented Jan 10, 2016

报错
$ 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

This comment has been minimized.

Copy link

commented Jan 21, 2016

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jun 12, 2016

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

@ERICWUYU

This comment has been minimized.

Copy link

commented Aug 17, 2016

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

That's all right!

@shizhonghai

This comment has been minimized.

Copy link

commented Dec 8, 2016

这个插件得安装
$ 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),这是官网文档的部署配置

@hexojs hexojs 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.
You can’t perform that action at this time.