hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.2k stars 4.82k forks source link

"WARN No Layout:" Error on Prod only. #2651

Closed juliusdelta closed 7 years ago

juliusdelta commented 7 years ago

I keep running into this issue when trying to deploy to Netlify. This happened when I just changed my theme from cactus dark to Maupassant.

As the title states, when I run hexo generate on my local environment, it works, and then I run hexo server -s and everything works fine. It's only in prod that I'm experiencing these issues.

Here are the logs

12:39:21 AM: Build started
12:39:21 AM: Fetching cached dependencies
12:39:21 AM: Starting to download cache of 27.7MB
12:39:22 AM: Finished downloading cache in 313.668155ms
12:39:23 AM: Preparing Git Reference refs/heads/master
12:39:24 AM: Warning during submodule checkout: No submodule mapping found in .gitmodules for path 'themes/maupassant'
12:39:26 AM: Running build command: hexo generate
12:39:29 AM: v6.11.1 is already installed.
12:39:29 AM: Now using node v6.11.1 (npm v3.10.10)
12:39:29 AM: Using version v6.11.1 of node
12:39:30 AM: Using /opt/buildhome/.rvm/gems/ruby-2.1.2
12:39:31 AM: INFO Start processing
12:39:32 AM: INFO Files loaded in 319 ms
12:39:32 AM: WARN No layout: about/index.html
12:39:32 AM: WARN No layout: 2017/07/15/index/index.html
12:39:32 AM: WARN No layout: 2017/07/14/My-First-Rust-Mistake/index.html
12:39:32 AM: Build complete: exit code: 0
12:39:32 AM: WARN No layout: 2017/04/13/Tips-For-Breaking-Into-Tech-Industry/index.html
WARN No layout: 2017/04/12/recursion/index.html
12:39:32 AM: Cleaning up docker container
12:39:32 AM: WARN No layout: 2017/04/11/My-Dev-Environment/index.html
12:39:32 AM: WARN No layout: archives/index.html
12:39:32 AM: WARN No layout: archives/2017/index.html
12:39:32 AM: WARN No layout: archives/2017/04/index.html
12:39:32 AM: WARN No layout: archives/2017/07/index.html
12:39:32 AM: Starting to deploy site from '/public'
12:39:32 AM: WARN No layout: index.html
12:39:32 AM: Deploying to CDN
12:39:32 AM: WARN No layout: tags/development/index.html
12:39:32 AM: Starting deploy of directory /mnt/build-work/buildbot-281806117/repo/public
12:39:32 AM: WARN No layout: tags/jobs/index.html
12:39:33 AM: WARN No layout: tags/rust/index.html
12:39:33 AM: WARN No layout: tags/recursion/index.html
12:39:33 AM: INFO Generated: index.html
12:39:33 AM: INFO Generated: about/index.html
12:39:33 AM: INFO Generated: archives/index.html
12:39:33 AM: INFO Generated: archives/2017/04/index.html
12:39:33 AM: INFO Generated: tags/development/index.html
12:39:33 AM: Going to deploy the 0 required files
12:39:33 AM: INFO Generated: archives/2017/07/index.html
12:39:33 AM: Finished deploying directory /mnt/build-work/buildbot-281806117/repo/public
12:39:33 AM: INFO Generated: tags/rust/index.html
12:39:33 AM: INFO Generated: tags/jobs/index.html
12:39:33 AM: INFO Generated: tags/recursion/index.html
12:39:33 AM: Finished deploying 0 files in 684.065923ms
12:39:33 AM: INFO Generated: archives/2017/index.html
12:39:33 AM: INFO Generated: 2017/07/15/index/index.html
12:39:33 AM: Cleaning up the repository
12:39:33 AM: INFO Generated: 2017/07/14/My-First-Rust-Mistake/index.html
12:39:33 AM: INFO Generated: 2017/04/13/Tips-For-Breaking-Into-Tech-Industry/index.html
INFO Generated: 2017/04/11/My-Dev-Environment/index.html
12:39:33 AM: INFO Generated: 2017/04/12/recursion/index.html
12:39:33 AM: INFO 15 files generated in 30 ms
12:39:33 AM: Bundling and saving cache
12:39:33 AM: Cached NPM modules
12:39:34 AM: Starting post processing
12:39:34 AM: Post processing done
12:39:35 AM: Site is live
12:39:38 AM: Finished uploading cache in 884.506546ms
12:39:39 AM: Finished processing build request in 17.950401146s

Here is my _config.yml

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: Thoughts on Tech & Stuff
subtitle:  A place to share my thoughts on programming, tech, issues, or other things.
description: A place to share my thoughts on programming, tech, issues, or other things.
author: JD Gonzales
language:
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://juliusdelta.netlify.com 
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: maupassant

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type:

Here's a link to the full repo to poke around in if needed

More context can be provided if necessary.

juliusdelta commented 7 years ago

This was actually an issue due to the theme I was using referencing a git-submodule which is really irritating. I was able to get it resolved with some fancy folder renaming and deletion of a .git folder.