Closed kulley closed 7 years ago
Maybe it has been installed, it is just a warning.
However, when I use hexo server
, it give me ERROR as below:
MacBook-Pro:blog shawnmo$ hexo s
ERROR Script load failed: themes/overdose/scripts/related-posts.js
Error: Cannot find module 'lodash'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (/Users/shawnmo/blog/node_modules/hexo/lib/hexo/index.js:213:21)
at /Users/shawnmo/blog/themes/overdose/scripts/related-posts.js:1:74
at /Users/shawnmo/blog/node_modules/hexo/lib/hexo/index.js:229:12
at tryCatcher (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:636:18)
at Promise._resolveCallback (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:431:57)
at Promise._settlePromiseFromHandler (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:522:17)
at Promise._settlePromise (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/promise.js:636:18)
at /Users/shawnmo/blog/node_modules/hexo/node_modules/bluebird/js/release/nodeback.js:42:21
at /Users/shawnmo/blog/node_modules/hexo/node_modules/hexo-fs/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
INFO Start processing
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
And then, it is what http://localhost:4000/
looks like:
So, I hope u can help me.
@kulley Hi, Thank you for reporting.
You should make sure that 'lodash' is installed.
Would you reinstall the hexo? Hexo is including lodash
library.
If you don't know how to do, try this commands in your blog directory.
$ npm uninstall -g hexo
$ rm -rf node_modules
$ npm install
$ hexo server
@HyunSeob Thanks for your response~
I have checked my blog directory. And in the directory : ~/blog/node_modules/hexo/node_modules
exits the file called loadsh
@kulley What is your version of npm? Maybe It is happened because of your npm version.
Update your Node.js and npm version to latest. Then delete all your node_modules, and reinstall them all. Then try hexo server
again.
I recommend that make Node.js version to upper than v6.0, and npm version to upper than v3.0.
@HyunSeob I have updated my Node.js and npm...
MacBook-Pro:~ shawnmo$ npm --version
3.10.8
MacBook-Pro:~ shawnmo$ node --version
v6.8.0
However, it still cannot work and lots of ERRORS come out.
Error: Module version mismatch. Expected 48, got 46.
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log/node_modules/bunyan/lib/bunyan.js:79:18)
{ Error: Cannot find module './build/default/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './build/Debug/DTraceProviderBindings'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/hexo-cli/node_modules/hexo-log/node_modules/bunyan/lib/bunyan.js:79:18)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32) code: 'MODULE_NOT_FOUND' }
INFO Start processing
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
@kulley hmm.. maybe you have to reinstall hexo-cli
. Try following commands.
$ npm uninstall -g hexo-cli
$ npm install -g hexo-cli
And then, retry running a server.
OK, ALL IS DONE!
MacBook-Pro:blog shawnmo$ hexo s
INFO Start processing
INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
BUT, when I open http://localhost:4000/
It tells me that "ERROR: File to import not found or unreadable: bourbon"
However, Ummm... (besides I have give it chmod 777
)
@kulley Have you reinstall hexo-renderer-bourbon
? You have to install it, not hexo-renderer-sass
.
@kulley Hey, is your problem resolved? I want to close this issue.
OK, thx.
When I use
npm install hexo-renderer-jade --save
, it gives me this warning:So, I don't really how to install this
hexo-renderer-jage
. Could you please tell me how to deal with it? Thanks~