node.jsdocpad

Docpad crash path.resolve


What causes the following error and how can it be fixed?

ESC[31merror:ESC[39m Something went wrong with the action
ESC[31merror:ESC[39m An error occured: 
TypeError: Arguments to path.resolve must be strings
  at Object.exports.resolve (path.js:313:15)
  at /usr/local/lib/node_modules/docpad/out/lib/docpad.js:1406:36
  at Object.safeps.getHomePath (/usr/local/lib/node_modules/docpad/node_modules/safeps/out/lib/safeps.js:383:7)
  at Task.<anonymous> (/usr/local/lib/node_modules/docpad/out/lib/docpad.js:1401:25)
  at ambi (/usr/local/lib/node_modules/docpad/node_modules/ambi/out/lib/ambi.js:55:18)
  at fire (/usr/local/lib/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:373:25)
  at b (domain.js:183:18)
  at Domain.run (domain.js:123:23)
  at Task.fire (/usr/local/lib/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:384:25)
  at Object._onImmediate (/usr/local/lib/node_modules/docpad/node_modules/taskgroup/out/lib/taskgroup.js:400:26)
  at processImmediate [as _immediateCallback] (timers.js:345:15)
ESC[31merror:ESC[39m To report the above error, follow the guide at: http://docpad.org/bug-report
ESC[32minfo:ESC[39m Shutting down... cya next time!

My docpad site is at https://github.com/robotbrain/gitio-site-docpad


Solution

  • Fixed by setting HOME and using setuid in the upstart script