When trying to generate my blog on my development environment (using hexo generate --staging development) I get the following error.
device:blog user$ hexo generate --staging development
ERROR Plugin load failed: hexo-staging
TypeError: Cannot read property 'options' of undefined
at module.exports (/Users/user/Sites/blog/node_modules/hexo-staging/lib/cli.js:33:15)
at /Users/user/Sites/blog/node_modules/hexo-staging/index.js:61:28
at /Users/user/Sites/blog/node_modules/hexo/lib/hexo/index.js:232:12
at tryCatcher (/Users/user/Sites/blog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:638:18)
at Promise._resolveCallback (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:432:57)
at Promise._settlePromiseFromHandler (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:524:17)
at Promise._settlePromise (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/Users/user/Sites/blog/node_modules/bluebird/js/release/promise.js:638:18)
at /Users/user/Sites/blog/node_modules/bluebird/js/release/nodeback.js:42:21
at /Users/user/Sites/blog/node_modules/graceful-fs/graceful-fs.js:78:16
at tryToString (fs.js:513:3)
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:501:12)
This prevents the site from building correctly. I had to update cli.js to prevent it from setting server options if cli.server is undefined. See the code below.
Hi,
First of all thanks for making this plugin, it works like a charm (well, almost) 😄!
I ran
npm install hexo-staging --save
to install the plugin and added the following variables to my config.When trying to generate my blog on my development environment (using
hexo generate --staging development
) I get the following error.This prevents the site from building correctly. I had to update
cli.js
to prevent it from setting server options ifcli.server
is undefined. See the code below.I am using Hexo version 3.3.9.