Closed joejztang closed 6 years ago
Lets try this:
# global hexo reinstall latest
npm install --global hexo-cli@latest --no-cache
# module updater is helpful
npm install --global npm-check-updates
# in your project
rm -rf node_modules debug.log db.json
ncu -an # module update with npm-check-updates
npm install
hexo clean
hexo server --debug
What happens if you do all that?
at the end it is like this.
20:20:14.995 DEBUG Hexo version: 3.6.0
20:20:14.998 DEBUG Working directory: ~/Documents/myBlog/
20:20:15.280 DEBUG Config loaded: ~/Documents/myBlog/_config.yml
20:20:15.408 DEBUG Plugin loaded: hexo-deployer-git
20:20:15.419 DEBUG Plugin loaded: hexo-generator-archive
20:20:15.424 DEBUG Plugin loaded: hexo-generator-category
20:20:15.428 DEBUG Plugin loaded: hexo-generator-index
20:20:15.497 DEBUG Plugin loaded: hexo-generator-search
20:20:15.511 DEBUG Plugin loaded: hexo-generator-searchdb
20:20:15.514 DEBUG Plugin loaded: hexo-generator-tag
20:20:15.524 DEBUG Plugin loaded: hexo-renderer-ejs
20:20:15.575 DEBUG Plugin loaded: hexo-renderer-marked
20:20:15.598 DEBUG Plugin loaded: hexo-renderer-stylus
20:20:15.791 DEBUG Plugin loaded: hexo-server
20:20:15.809 DEBUG Script loaded: themes/next/scripts/merge-configs.js
20:20:15.809 DEBUG Script loaded: themes/next/scripts/tags/button.js
20:20:15.809 DEBUG Script loaded: themes/next/scripts/tags/center-quote.js
20:20:15.810 DEBUG Script loaded: themes/next/scripts/tags/full-image.js
20:20:15.810 DEBUG Script loaded: themes/next/scripts/tags/exturl.js
20:20:15.811 DEBUG Script loaded: themes/next/scripts/tags/note.js
20:20:15.812 DEBUG Script loaded: themes/next/scripts/tags/group-pictures.js
20:20:15.814 DEBUG Script loaded: themes/next/scripts/merge.js
20:20:15.820 DEBUG Loading database.
20:20:15.827 INFO Start processing
20:20:16.260 DEBUG Processed: source/css/main.styl
20:20:16.260 DEBUG Processed: source/images/avatar.gif
20:20:16.261 DEBUG Processed: source/images/algolia_logo.svg
20:20:16.262 DEBUG Processed: source/images/cc-by-nc-nd.svg
20:20:16.262 DEBUG Processed: source/images/cc-by-nc.svg
20:20:16.263 DEBUG Processed: source/images/cc-by-nc-sa.svg
20:20:16.263 DEBUG Processed: source/images/cc-by.svg
20:20:16.264 DEBUG Processed: source/images/cc-by-nd.svg
20:20:16.265 DEBUG Processed: source/images/cc-by-sa.svg
20:20:16.265 DEBUG Processed: source/images/loading.gif
20:20:16.266 DEBUG Processed: source/images/placeholder.gif
20:20:16.266 DEBUG Processed: source/images/quote-l.svg
20:20:16.266 DEBUG Processed: source/images/cc-zero.svg
20:20:16.409 DEBUG Processed: layout/.DS_Store
20:20:16.419 DEBUG Theme config loaded.
20:20:16.430 DEBUG Processed: about/index.md
20:20:16.430 DEBUG Processed: languages/de.yml
20:20:16.431 DEBUG Processed: languages/default.yml
20:20:16.431 DEBUG Processed: languages/en.yml
20:20:16.431 DEBUG Processed: languages/fr-FR.yml
20:20:16.431 DEBUG Processed: languages/id.yml
20:20:16.431 DEBUG Processed: languages/ko.yml
20:20:16.432 DEBUG Processed: languages/pt-BR.yml
20:20:16.432 DEBUG Processed: languages/ja.yml
20:20:16.432 DEBUG Processed: languages/ru.yml
20:20:16.432 DEBUG Processed: languages/pt.yml
20:20:16.432 DEBUG Processed: languages/zh-tw.yml
20:20:16.432 DEBUG Processed: languages/zh-Hans.yml
20:20:16.432 DEBUG Processed: languages/zh-hk.yml
20:20:16.433 DEBUG Processed: _config.yml
20:20:16.435 DEBUG Processed: categories/index.md
20:20:16.437 DEBUG Processed: _posts/Numpy-introductions.md
20:20:16.438 DEBUG Processed: source/images/searchicon.png
20:20:16.441 DEBUG Processed: source/images/quote-r.svg
20:20:16.442 DEBUG Processed: _posts/create-a-new-model-in-django.md
20:20:16.459 DEBUG Processed: _posts/Django-application-simple-tutorial.md
20:20:16.462 DEBUG Processed: _posts/First.md
20:20:16.468 DEBUG Processed: _posts/PHP-include-include-once-require-require-once.md
20:20:16.477 DEBUG Processed: _posts/static-photo.md
20:20:16.478 DEBUG Processed: _posts/hexo-cheating-sheet.md
20:20:16.481 DEBUG Processed: _posts/Https-local-environment.md
20:20:16.482 DEBUG Processed: _posts/super-in-python.md
20:20:16.484 DEBUG Processed: _posts/django-sqlite-migrate-and-admin.md
20:20:16.484 DEBUG Processed: _posts/learning-source-complition.md
20:20:16.485 DEBUG Processed: _posts/java-read-write.md
20:20:16.486 DEBUG Processed: _posts/php-composer.md
20:20:16.487 DEBUG Processed: _posts/php-debug-500.md
20:20:16.492 DEBUG Processed: _posts/regular-expression-python3.md
20:20:16.493 DEBUG Processed: _posts/templates-excise.md
20:20:16.495 DEBUG Processed: _posts/traverse-java-file.md
20:20:16.495 DEBUG Processed: _posts/python3-cheathing-sheet.md
20:20:16.682 DEBUG Processed: layout/index.swig
20:20:16.683 DEBUG Processed: layout/category.swig
20:20:16.683 DEBUG Processed: layout/_layout.swig
20:20:16.683 DEBUG Processed: layout/archive.swig
20:20:16.683 DEBUG Processed: layout/page.swig
20:20:16.683 DEBUG Processed: layout/post.swig
20:20:16.683 DEBUG Processed: layout/schedule.swig
20:20:16.683 DEBUG Processed: layout/tag.swig
20:20:16.686 DEBUG Processed: source/js/src/bootstrap.js
20:20:16.687 DEBUG Processed: source/js/src/affix.js
20:20:16.687 DEBUG Processed: source/js/src/algolia-search.js
20:20:16.688 DEBUG Processed: source/js/src/exturl.js
20:20:16.688 DEBUG Processed: source/js/src/hook-duoshuo.js
20:20:16.688 DEBUG Processed: source/js/src/js.cookie.js
20:20:16.689 DEBUG Processed: source/js/src/motion.js
20:20:16.689 DEBUG Processed: source/js/src/post-details.js
20:20:16.690 DEBUG Processed: source/js/src/scroll-cookie.js
20:20:16.690 DEBUG Processed: source/js/src/scrollspy.js
20:20:16.690 DEBUG Processed: source/js/src/utils.js
20:20:16.691 DEBUG Processed: source/lib/algolia-instant-search/instantsearch.min.css
20:20:16.691 DEBUG Processed: source/lib/canvas-ribbon/canvas-ribbon.js
20:20:16.691 DEBUG Processed: source/lib/canvas-nest/canvas-nest.min.js
20:20:16.692 DEBUG Processed: source/lib/fastclick/LICENSE
20:20:16.692 DEBUG Processed: source/lib/fastclick/README.md
20:20:16.693 DEBUG Processed: source/lib/fastclick/bower.json
20:20:16.693 DEBUG Processed: source/lib/jquery_lazyload/CONTRIBUTING.md
20:20:16.694 DEBUG Processed: source/lib/jquery_lazyload/README.md
20:20:16.694 DEBUG Processed: source/lib/jquery_lazyload/bower.json
20:20:16.694 DEBUG Processed: source/lib/jquery_lazyload/jquery.scrollstop.js
20:20:16.695 DEBUG Processed: source/lib/jquery_lazyload/jquery.lazyload.js
20:20:16.695 DEBUG Processed: source/lib/font-awesome/HELP-US-OUT.txt
20:20:16.761 DEBUG Processed: source/lib/font-awesome/bower.json
20:20:16.761 DEBUG Processed: source/lib/three/canvas_sphere.min.js
20:20:16.762 DEBUG Processed: source/images/atomic-symbol-1494506_640.png
20:20:16.762 DEBUG Processed: source/lib/three/three-waves.min.js
20:20:16.763 DEBUG Processed: source/lib/velocity/bower.json
20:20:16.764 DEBUG Processed: source/lib/three/canvas_lines.min.js
20:20:16.764 DEBUG Processed: source/lib/velocity/velocity.ui.min.js
20:20:16.764 DEBUG Processed: source/lib/velocity/velocity.ui.js
20:20:16.830 DEBUG Processed: layout/_custom/header.swig
20:20:16.831 DEBUG Processed: layout/_macro/post-copyright.swig
20:20:16.831 DEBUG Processed: layout/_custom/sidebar.swig
20:20:16.831 DEBUG Processed: layout/_macro/post-collapse.swig
20:20:16.831 DEBUG Processed: layout/_macro/reward.swig
20:20:16.831 DEBUG Processed: layout/_macro/sidebar.swig
20:20:16.831 DEBUG Processed: layout/_macro/wechat-subscriber.swig
20:20:16.831 DEBUG Processed: layout/_macro/post.swig
20:20:16.831 DEBUG Processed: layout/_partials/comments.swig
20:20:16.832 DEBUG Processed: layout/_partials/footer.swig
20:20:16.832 DEBUG Processed: layout/_partials/header.swig
20:20:16.832 DEBUG Processed: layout/_partials/pagination.swig
20:20:16.832 DEBUG Processed: layout/_partials/head.swig
20:20:16.832 DEBUG Processed: layout/_partials/page-header.swig
20:20:16.832 DEBUG Processed: layout/_partials/search.swig
20:20:16.832 DEBUG Processed: layout/_scripts/boostrap.swig
20:20:16.832 DEBUG Processed: layout/_scripts/commons.swig
20:20:16.832 DEBUG Processed: layout/_third-party/duoshuo-hot-articles.swig
20:20:16.833 DEBUG Processed: layout/_third-party/exturl.swig
20:20:16.834 DEBUG Processed: source/lib/jquery/index.js
20:20:16.853 DEBUG Processed: layout/_scripts/vendors.swig
20:20:16.853 DEBUG Processed: layout/_third-party/mathjax.swig
20:20:16.854 DEBUG Processed: layout/_third-party/schedule.swig
20:20:16.854 DEBUG Processed: layout/_third-party/scroll-cookie.swig
20:20:16.854 DEBUG Processed: layout/_scripts/schemes/mist.swig
20:20:16.854 DEBUG Processed: layout/_scripts/schemes/muse.swig
20:20:16.855 DEBUG Processed: source/lib/velocity/velocity.min.js
20:20:16.858 DEBUG Processed: source/js/src/schemes/pisces.js
20:20:16.859 DEBUG Processed: source/lib/Han/dist/han.min.css
20:20:16.860 DEBUG Processed: source/lib/fancybox/source/blank.gif
20:20:16.860 DEBUG Processed: source/lib/fancybox/source/fancybox_loading.gif
20:20:16.861 DEBUG Processed: source/lib/fancybox/source/fancybox_overlay.png
20:20:16.861 DEBUG Processed: source/lib/fancybox/source/fancybox_loading@2x.gif
20:20:16.862 DEBUG Processed: source/lib/fancybox/source/fancybox_sprite.png
20:20:16.862 DEBUG Processed: source/lib/fancybox/source/jquery.fancybox.css
20:20:16.863 DEBUG Processed: source/lib/fancybox/source/fancybox_sprite@2x.png
20:20:16.863 DEBUG Processed: source/lib/fancybox/source/jquery.fancybox.js
20:20:16.863 DEBUG Processed: source/lib/fastclick/lib/fastclick.js
20:20:16.864 DEBUG Processed: source/lib/Han/dist/han.min.js
20:20:16.864 DEBUG Processed: source/lib/fancybox/source/jquery.fancybox.pack.js
20:20:16.864 DEBUG Processed: source/lib/fastclick/lib/fastclick.min.js
20:20:16.865 DEBUG Processed: source/lib/font-awesome/css/font-awesome.css.map
20:20:16.865 DEBUG Processed: source/lib/font-awesome/css/font-awesome.css
20:20:16.865 DEBUG Processed: source/lib/font-awesome/css/font-awesome.min.css
20:20:16.893 DEBUG Processed: layout/_partials/head/external-fonts.swig
20:20:16.893 DEBUG Processed: layout/_partials/head/custom-head.swig
20:20:16.893 DEBUG Processed: layout/_partials/search/localsearch.swig
20:20:16.893 DEBUG Processed: layout/_partials/search/tinysou.swig
20:20:16.893 DEBUG Processed: layout/_partials/share/add-this.swig
20:20:16.893 DEBUG Processed: layout/_partials/search/swiftype.swig
20:20:16.893 DEBUG Processed: layout/_partials/share/baidushare.swig
20:20:16.894 DEBUG Processed: layout/_partials/share/duoshuo_share.swig
20:20:16.894 DEBUG Processed: layout/_partials/share/jiathis.swig
20:20:16.894 DEBUG Processed: layout/_scripts/pages/post-details.swig
20:20:16.894 DEBUG Processed: layout/_scripts/schemes/pisces.swig
20:20:16.894 DEBUG Processed: layout/_third-party/analytics/busuanzi-counter.swig
20:20:16.894 DEBUG Processed: layout/_third-party/analytics/baidu-analytics.swig
20:20:16.894 DEBUG Processed: layout/_third-party/analytics/application-insights.swig
20:20:16.894 DEBUG Processed: layout/_third-party/analytics/cnzz-analytics.swig
20:20:16.894 DEBUG Processed: layout/_third-party/analytics/index.swig
20:20:16.895 DEBUG Processed: layout/_third-party/analytics/facebook-sdk.swig
20:20:16.895 DEBUG Processed: layout/_third-party/analytics/google-analytics.swig
20:20:16.895 DEBUG Processed: layout/_third-party/analytics/lean-analytics.swig
20:20:16.895 DEBUG Processed: layout/_third-party/analytics/tencent-mta.swig
20:20:16.895 DEBUG Processed: layout/_third-party/analytics/tencent-analytics.swig
20:20:16.895 DEBUG Processed: layout/_third-party/analytics/vkontakte-api.swig
20:20:16.895 DEBUG Processed: layout/_third-party/comments/disqus.swig
20:20:16.895 DEBUG Processed: layout/_third-party/comments/gentie.swig
20:20:16.895 DEBUG Processed: layout/_third-party/comments/duoshuo.swig
20:20:16.896 DEBUG Processed: layout/_third-party/comments/changyan.swig
20:20:16.896 DEBUG Processed: layout/_third-party/comments/index.swig
20:20:16.899 DEBUG Processed: source/lib/ua-parser-js/dist/ua-parser.pack.js
20:20:16.900 DEBUG Processed: source/lib/ua-parser-js/dist/ua-parser.min.js
20:20:16.900 DEBUG Processed: source/lib/Han/dist/han.css
20:20:16.901 DEBUG Processed: source/lib/Han/dist/han.js
20:20:16.901 DEBUG Processed: source/lib/font-awesome/fonts/fontawesome-webfont.woff2
20:20:16.902 DEBUG Processed: source/lib/font-awesome/fonts/fontawesome-webfont.woff
20:20:16.953 DEBUG Processed: layout/_third-party/comments/hypercomments.swig
20:20:16.953 DEBUG Processed: layout/_third-party/comments/livere.swig
20:20:16.954 DEBUG Processed: layout/_third-party/comments/youyan.swig
20:20:16.954 DEBUG Processed: layout/_third-party/search/index.swig
20:20:16.954 DEBUG Processed: layout/_third-party/search/tinysou.swig
20:20:16.954 DEBUG Processed: layout/_third-party/seo/baidu-push.swig
20:20:16.954 DEBUG Processed: layout/_third-party/search/localsearch.swig
20:20:16.957 DEBUG Processed: source/lib/Han/dist/font/han-space.otf
20:20:16.958 DEBUG Processed: source/lib/Han/dist/font/han-space.woff
20:20:16.958 DEBUG Processed: source/lib/fancybox/source/helpers/fancybox_buttons.png
20:20:16.958 DEBUG Processed: source/lib/fancybox/source/helpers/jquery.fancybox-buttons.css
20:20:16.959 DEBUG Processed: source/lib/Han/dist/font/han.otf
20:20:16.959 DEBUG Processed: source/lib/fancybox/source/helpers/jquery.fancybox-buttons.js
20:20:16.959 DEBUG Processed: source/lib/fancybox/source/helpers/jquery.fancybox-media.js
20:20:16.960 DEBUG Processed: source/lib/font-awesome/fonts/fontawesome-webfont.ttf
20:20:16.960 DEBUG Processed: source/lib/Han/dist/font/han.woff
20:20:16.960 DEBUG Processed: source/lib/velocity/velocity.js
20:20:16.961 DEBUG Processed: source/lib/font-awesome/fonts/fontawesome-webfont.eot
20:20:16.961 DEBUG Processed: source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.css
20:20:16.961 DEBUG Processed: source/lib/font-awesome/fonts/FontAwesome.otf
20:20:16.966 DEBUG Processed: layout/_third-party/search/algolia-search/assets.swig
20:20:16.966 DEBUG Processed: layout/_third-party/search/algolia-search/dom.swig
20:20:16.968 DEBUG Processed: source/lib/algolia-instant-search/instantsearch.min.js
20:20:16.968 DEBUG Processed: source/lib/fancybox/source/helpers/jquery.fancybox-thumbs.js
20:20:16.970 DEBUG Processed: source/lib/three/three.min.js
20:20:16.971 DEBUG Processed: source/lib/font-awesome/fonts/fontawesome-webfont.svg
20:20:17.475 FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: unknown block tag: extend
at Object._prettifyError (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/node_modules/nunjucks/src/lib.js:35:11)
at Template.render (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/node_modules/nunjucks/src/environment.js:526:21)
at Environment.renderString (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/node_modules/nunjucks/src/environment.js:364:17)
at Promise (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/lib/extend/tag.js:66:9)
at Promise._execute (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/debuggability.js:300:9)
at Promise._resolveFromExecutor (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/promise.js:79:10)
at Tag.render (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/lib/extend/tag.js:64:10)
at Object.tagFilter [as onRenderEnd] (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/lib/hexo/post.js:260:16)
at Promise.then.then.result (/Users/jizhoutang/Documents/myBlog/node_modules/hexo/lib/hexo/render.js:65:19)
at tryCatcher (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/jizhoutang/Documents/myBlog/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
20:20:17.502 DEBUG Database saved
Which theme?
From inside your project directory run grep -ri "extend" themes
. It can tell you which line the bug is on.
If that doesn't help lets try swapping out your renderer: https://npms.io/search?q=hexo+nunjucks
Oh, I forget I use a different theme. It is next.
Maybe it is that.
Ah yes that is a popular theme right now. It says it uses swig files in here https://github.com/iissnan/hexo-theme-next/tree/master/layout
You may or may not need this: https://github.com/hexojs/hexo-renderer-swig#installation
I think Hexo is supposed to render swig by default but they might want to change that in the future. I'm unsure. 🤷♂️
doesn't work. Though I found something interesting. I tried to install nunjucks, and I found it doesn't support python3. maybe that is the reason of all thest.
doesn't work changing to python 2. similar output.
It can do nunjucks templates just with node. No python is required.
Something you can try is strip out all the private information and upload it over to github. Then someone here can test it too.
I forget where I insert my personal information in. So never mind, I find the structure is fairly simple, I just re-install everything and re-configure everything.
Environment Info
Node version(
node -v
): tried 8.10.0, 6.13.1Your site
_config.yml
(Optional):Your theme
_config.yml
(Optional):Hexo and Plugin version(
npm ls --depth 0
): 3.6.0For BUG
For question
I had a hexo site before and was running, but because I changed my laptop, so that all the evironment is lost. I wanted to simply recover my site.
I tried node v 8.10.0 and when I started
hexo server
it gives me the followingwhen I changed to node js v 6.13.1, and run the same command, it gave me the similar error:
I think the issue is because I forget which version of node js did I use. So instead just create the blog from the start, what else can I try? All answers are appreciated.
For feature request