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

Arguments to path.join must be strings (deploy to OpenShift) #870

Closed
aixnr opened this Issue Oct 4, 2014 · 10 comments

Comments

5 participants
@aixnr
Copy link

aixnr commented Oct 4, 2014

My installation steps:

  • Create DIY cartridge on the OpenShift
  • Clone the cartridge to local
  • hexo init to the folder
  • cd into that folder, npm install
  • nano _config.yml to edit the deploy mode
deploy:
  type: openshift
  remote: origin
  branch: master
  • .gitignore contained the following lines: I deleted it
.DS_Store
Thumbs.db
db.json
debug.log
node_modules/
public/
.deploy/
  • hexo generate went fine, however hexo deploy returned the following error.
[info] Start deploying: openshift
[error] TypeError: Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.module.exports [as openshift] (/Users/anarchy/.nvm/v0.10.32/lib/node_modules/hexo/lib/plugins/deployer/openshift.js:47:22)
    at /Users/anarchy/.nvm/v0.10.32/lib/node_modules/hexo/lib/plugins/console/deploy.js:76:22
    at iterate (/Users/anarchy/.nvm/v0.10.32/lib/node_modules/hexo/node_modules/async/lib/async.js:149:13)
    at Object.async.eachSeries (/Users/anarchy/.nvm/v0.10.32/lib/node_modules/hexo/node_modules/async/lib/async.js:165:9)
    at /Users/anarchy/.nvm/v0.10.32/lib/node_modules/hexo/lib/plugins/console/deploy.js:66:11
    at /Users/anarchy/.nvm/v0.10.32/lib/node_modules/hexo/lib/plugins/console/deploy.js:32:27
    at Object.cb [as oncomplete] (evalmachine.<anonymous>:168:19)

I have a very strong feeling that I did wrong somewhere else. Btw, I didn't empty the original contents of the DIY cartridge (it had stuffs like diy folder, misc folder, and README.md).

@tommy351

This comment has been minimized.

Copy link
Member

tommy351 commented Oct 4, 2014

You have to set root setting. Sorry I didn't mention that in the documentation.

deploy:
  type: openshift
  root: <root directory>
  remote: <upstream git remote>
  branch: [upstream git branch] # Default is master
  message: [message]
@aixnr

This comment has been minimized.

Copy link

aixnr commented Oct 4, 2014

@tommy351 that's fine. By the way, what kind of value should be there for the root?

@tommy351

This comment has been minimized.

Copy link
Member

tommy351 commented Oct 4, 2014

Actually I don't know. But you can ask the one who make this pull request. #770

@aixnr

This comment has been minimized.

Copy link

aixnr commented Oct 4, 2014

If that so, we need @josbuurman here. The correct installation steps for OpenShift are still unclear here. It would be great if you can paste here the directory structure along with the sample deploy directives.

@aixnr

This comment has been minimized.

Copy link

aixnr commented Oct 4, 2014

Update

This is how my _config.yml looks like

deploy:
  type: openshift
  root: .
  remote: origin
  branch: master

And this is the directory structure:

screen shot 2014-10-04 at 3 02 26 pm

What I noticed is that everytime I ran hexo deploy, the command would empty the diy folder and then it would replace the folder content with newly generated static files (same as the ones in the public folder). That command also returned this error:

[info] Start deploying: openshift
[error] Error: ENOENT, chmod '/Users/xxx/Documents/scg/v2/diy/testrubyserver.rb'
Error: ENOENT, chmod '/Users/xxx/Documents/scg/v2/diy/testrubyserver.rb'

Any thoughts?

@aixnr

This comment has been minimized.

Copy link

aixnr commented Oct 4, 2014

Update

Manually copying the testrubyserver.rb into the diy folder, then running the

git add .  && git commit -m "some message here" && git push

... solves the issue, and the Hexo is accessible on the web after that. Seems like the behavior specific to handling the presence of testrubyserver.rb needs to be revisited and proper documentation for OpenShift needs to fixed.

p/s: I am not a coder. Just a regular linux user.

@tommyku

This comment has been minimized.

Copy link

tommyku commented Jan 8, 2015

I solved the problem by changing the line in hexo/lib/plugins/deployer/openshift.js

file.copyFile(blogDir+'/testrubyserver.rb', publicDir);

to

file.copyFile(blogDir+'/testrubyserver.rb', publicDir+'/testrubyserver.rb');

Wanted to make a pull request, but can't find deployer/openshift.js from this repo...

@tommy351

This comment has been minimized.

Copy link
Member

tommy351 commented Jan 10, 2015

@tommyku Built-in deployer plugins will be separated from the main module in Hexo 3.0. Heroku and OpenShift deployer are not done yet.

@Alex1990

This comment has been minimized.

Copy link

Alex1990 commented Mar 26, 2015

Just record this error I came cross.

After changing the repository name on github, I forgot to update the repo url in _config.yml. So the current repo url is inexistent in actually. Then, executing hexo generate or hexo deploy command will result the below error message:

chaoalex:myblog$ hexo d
[info] Start deploying: git
[error] TypeError: Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
    at Object.posix.join (path.js:471:13)
    at Object.module.exports [as git] (/Users/chaoalex/w/myblog/node_modules/hexo-deployer-git/lib/deployer.js:18:26)
    at /usr/local/lib/node_modules/hexo/lib/plugins/console/deploy.js:76:22
    at iterate (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:149:13)
    at Object.async.eachSeries (/usr/local/lib/node_modules/hexo/node_modules/async/lib/async.js:165:9)
    at /usr/local/lib/node_modules/hexo/lib/plugins/console/deploy.js:66:11
    at /usr/local/lib/node_modules/hexo/lib/plugins/console/deploy.js:32:27
    at FSReqWrap.cb [as oncomplete] (evalmachine.<anonymous>:228:19)
@leesei

This comment has been minimized.

Copy link
Member

leesei commented Jul 16, 2015

This issue was moved to hexojs/hexo-deployer-openshift#1

@leesei leesei closed this Jul 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment