4

これを試してみると、エラーがスローされます。どうすれば解決できますか?

$ hexo generate
ERROR Error: Cannot find module 'bluebird'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/lihz/blog/node_modules/hexo/lib/hexo/index.js:3:15)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /usr/local/lib/node_modules/hexo-cli/lib/index.js:73:18
    at tryCatcher (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:489:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:565:18)
    at Promise._settlePromises (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:681:14)
Unhandled rejection TypeError: Cannot call method 'then' of undefined
    at /usr/local/lib/node_modules/hexo-cli/lib/index.js:82:22
    at tryCatcher (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:489:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:565:18)
    at Async._drainQueue (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/async.js:133:10)
    at Async.drainQueues (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/main/async.js:15:14)
    at process._tickCallback (node.js:442:13)
4

5 に答える 5

14

bluebird パッケージをローカルにインストールする必要がある場合があります。試す

npm install --save bluebird
于 2015-07-13T08:35:48.353 に答える