Eleventy: 11ty can't find _includes directory

Created on 22 Sep 2019  Β·  16Comments  Β·  Source: 11ty/eleventy

This error comes up when serving, dry-running or debugging - pretty much the same basic issue:

npx @11ty/eleventy --serve
Problem writing Eleventy templates: (more in DEBUG output)
> TemplateLayoutPathResolver directory does not exist for page.liquid: _includes

`Error` was thrown:
    Error: TemplateLayoutPathResolver directory does not exist for page.liquid: _includes

I have even deleted the _includes folder and moved my two .liquid layout files into _layouts and removed all references to _includes from .eleventy.js - the error persists. I have no idea what is causing this. Help!

Environment:

  • OS and Version: Linux Mint 19.2
  • Eleventy Version 0.9.0
needs-triage

Most helpful comment

@dixonge, I also get the error if I mistakenly try to run npx eleventy --serve from a directory other than the root. Is that what happened? (Of course, it’s not a very intuitive error message in that instance.)

All 16 comments

After moving a few things around, still getting same error. Current setup:

Folder/file structure location:

  _includes
    _layouts
      post.liquid
      page.liquid

Contents of .eleventy.js:

module.exports = function(eleventyConfig) {
  return {
    dir: {
      input: "content",
      includes: "_includes",
      layouts: "_includes/_layouts",
      output: "_site"
    }
  }
};
module.exports = function(eleventyConfig) {
  eleventyConfig.addPassthroughCopy("assets");
  return {
    passthroughFileCopy: true
  }
};

Results of latest DEBUG:

DEBUG=Eleventy* npx @11ty/eleventy
  Eleventy:UserConfig Resetting EleventyConfig to initial values. +0ms
  Eleventy:Config Setting up global TemplateConfig. +0ms
  Eleventy:UserConfig Adding universal filter 'slug' +15ms
  Eleventy:UserConfig Adding universal filter 'url' +3ms
  Eleventy:TemplateConfig rootConfig { templateFormats: [ 'liquid', 'ejs', 'md', 'hbs', 'mustache', 'haml', 'pug', 'njk', 'html', 'jstl', '11ty.js' ], pathPrefix: '/', markdownTemplateEngine: 'liquid', htmlTemplateEngine: 'liquid', dataTemplateEngine: 'liquid', passthroughFileCopy: true, htmlOutputSuffix: '-o', jsDataFileSuffix: '.11tydata', keys: { package: 'pkg', layout: 'layout', permalink: 'permalink', permalinkRoot: 'permalinkBypassOutputDir', engineOverride: 'templateEngineOverride' }, dir: { input: '.', includes: '_includes', data: '_data', output: '_site' }, filters: {}, handlebarsHelpers: {}, nunjucksFilters: {} } +0ms
  Eleventy:TemplateConfig Merging config with /media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/.eleventy.js +6ms
  Eleventy:TemplateConfig localConfig: { passthroughFileCopy: true, templateFormats: undefined, filters: {}, linters: {}, layoutAliases: {}, passthroughCopies: { assets: true }, liquidOptions: {}, liquidTags: {}, liquidFilters: { slug: [Function], url: [Function] }, liquidShortcodes: {}, liquidPairedShortcodes: {}, nunjucksFilters: { slug: [Function], url: [Function] }, nunjucksAsyncFilters: {}, nunjucksTags: {}, nunjucksShortcodes: {}, nunjucksPairedShortcodes: {}, handlebarsHelpers: { slug: [Function], url: [Function] }, handlebarsShortcodes: {}, handlebarsPairedShortcodes: {}, javascriptFunctions: { slug: [Function], url: [Function] }, pugOptions: {}, ejsOptions: {}, markdownHighlighter: null, libraryOverrides: {}, dynamicPermalinks: true, useGitIgnore: true, dataDeepMerge: false, experiments: Set {}, watchJavaScriptDependencies: true, browserSyncConfig: {}, frontMatterParsingOptions: undefined } +6ms
  Eleventy:TemplateConfig overrides: {} +1ms
  Eleventy:TemplateConfig Current configuration: { templateFormats: [ 'liquid', 'ejs', 'md', 'hbs', 'mustache', 'haml', 'pug', 'njk', 'html', 'jstl', '11ty.js' ], pathPrefix: '/', markdownTemplateEngine: 'liquid', htmlTemplateEngine: 'liquid', dataTemplateEngine: 'liquid', passthroughFileCopy: true, htmlOutputSuffix: '-o', jsDataFileSuffix: '.11tydata', keys: { package: 'pkg', layout: 'layout', permalink: 'permalink', permalinkRoot: 'permalinkBypassOutputDir', engineOverride: 'templateEngineOverride' }, dir: { input: '.', includes: '_includes', data: '_data', output: '_site' }, filters: {}, handlebarsHelpers: { slug: [Function], url: [Function] }, nunjucksFilters: { slug: [Function], url: [Function] }, linters: {}, layoutAliases: {}, passthroughCopies: { assets: true }, liquidOptions: {}, liquidTags: {}, liquidFilters: { slug: [Function], url: [Function] }, liquidShortcodes: {}, liquidPairedShortcodes: {}, nunjucksAsyncFilters: {}, nunjucksTags: {}, nunjucksShortcodes: {}, nunjucksPairedShortcodes: {}, handlebarsShortcodes: {}, handlebarsPairedShortcodes: {}, javascriptFunctions: { slug: [Function], url: [Function] }, pugOptions: {}, ejsOptions: {}, markdownHighlighter: null, libraryOverrides: {}, dynamicPermalinks: true, useGitIgnore: true, dataDeepMerge: false, experiments: Set {}, watchJavaScriptDependencies: true, browserSyncConfig: {}, frontMatterParsingOptions: undefined } +3ms
  Eleventy:CommandCheck command: eleventy   +0ms
  Eleventy:TemplatePassthroughManager Resetting counts to 0 +0ms
  Eleventy:EleventyFiles /media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/.gitignore,.gitignore ignoring: !./node_modules/** +0ms
  Eleventy:EleventyFiles /media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/.gitignore,.gitignore ignoring: !/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/** +0ms
  Eleventy:EleventyFiles /media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/.gitignore,.gitignore ignoring: !./node_modules/** +0ms
  Eleventy Directories:
  Eleventy Input: .
  Eleventy Data: _data
  Eleventy Includes: _includes
  Eleventy Layouts: undefined
  Eleventy Output: _site
  Eleventy Template Formats: liquid,ejs,md,hbs,mustache,haml,pug,njk,html,jstl,11ty.js +0ms
  Eleventy:EleventyFiles Searching for: [ './**/*.liquid', './**/*.ejs', './**/*.md', './**/*.hbs', './**/*.mustache', './**/*.haml', './**/*.pug', './**/*.njk', './**/*.html', './**/*.jstl', './**/*.11ty.js', '!./node_modules/**', '!/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/**', '!./node_modules/**', '!./_site/**', '!./_includes/**', '!./_data/**' ] +29ms
  Eleventy:TemplateWriter Found: [ './content/index.md', './content/news.html', './content/pages.html', './content/pages/dixon-jackson-house.md', './content/pages/dixon-mills-across-america.md', './content/pages/dixon-wilson-house.md', './content/pages/nichols-house.md', './content/pages/samuel-p-dixon-house.md', './content/posts/2018-07-27-dixons-of-the-world-unite.md', './content/posts/2018-07-27-fading-memories.md', './content/_includes/_layouts/page.liquid', './content/_includes/_layouts/post.liquid' ] +0ms
  Eleventy:TemplatePassthroughManager TemplatePassthrough copy started. +50ms
  Eleventy:TemplatePassthroughManager `passthroughFileCopy` config paths: { assets: true } +0ms
  Eleventy:TemplatePassthroughManager `passthroughFileCopy` config normalized paths: [ { inputPath: './assets', outputPath: true } ] +1ms
  Eleventy:TemplatePassthroughManager TemplatePassthrough copying from config: [object Object] +0ms
  Eleventy:TemplatePassthrough Copying './assets' +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +0ms
  Eleventy:TemplateData getLocalDataPaths('./content/index.md'): [ './content/index.11tydata.js', './content/index.11tydata.json', './content/index.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +1ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/news.html'): [ './content/news.11tydata.js', './content/news.11tydata.json', './content/news.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +1ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +0ms
  Eleventy:TemplateData getLocalDataPaths('./content/pages.html'): [ './content/pages.11tydata.js', './content/pages.11tydata.json', './content/pages.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/pages/dixon-jackson-house.md'): [ './content/pages/dixon-jackson-house.11tydata.js', './content/pages/dixon-jackson-house.11tydata.json', './content/pages/dixon-jackson-house.json', './content/pages/pages.11tydata.js', './content/pages/pages.11tydata.json', './content/pages/pages.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/pages/dixon-mills-across-america.md'): [ './content/pages/dixon-mills-across-america.11tydata.js', './content/pages/dixon-mills-across-america.11tydata.json', './content/pages/dixon-mills-across-america.json', './content/pages/pages.11tydata.js', './content/pages/pages.11tydata.json', './content/pages/pages.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +0ms
  Eleventy:TemplateData getLocalDataPaths('./content/pages/dixon-wilson-house.md'): [ './content/pages/dixon-wilson-house.11tydata.js', './content/pages/dixon-wilson-house.11tydata.json', './content/pages/dixon-wilson-house.json', './content/pages/pages.11tydata.js', './content/pages/pages.11tydata.json', './content/pages/pages.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/pages/nichols-house.md'): [ './content/pages/nichols-house.11tydata.js', './content/pages/nichols-house.11tydata.json', './content/pages/nichols-house.json', './content/pages/pages.11tydata.js', './content/pages/pages.11tydata.json', './content/pages/pages.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +1ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/pages/samuel-p-dixon-house.md'): [ './content/pages/samuel-p-dixon-house.11tydata.js', './content/pages/samuel-p-dixon-house.11tydata.json', './content/pages/samuel-p-dixon-house.json', './content/pages/pages.11tydata.js', './content/pages/pages.11tydata.json', './content/pages/pages.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/posts/2018-07-27-dixons-of-the-world-unite.md'): [ './content/posts/2018-07-27-dixons-of-the-world-unite.11tydata.js', './content/posts/2018-07-27-dixons-of-the-world-unite.11tydata.json', './content/posts/2018-07-27-dixons-of-the-world-unite.json', './content/posts/posts.11tydata.js', './content/posts/posts.11tydata.json', './content/posts/posts.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/posts/2018-07-27-fading-memories.md'): [ './content/posts/2018-07-27-fading-memories.11tydata.js', './content/posts/2018-07-27-fading-memories.11tydata.json', './content/posts/2018-07-27-fading-memories.json', './content/posts/posts.11tydata.js', './content/posts/posts.11tydata.json', './content/posts/posts.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +1ms
  Eleventy:TemplateData getLocalDataPaths('./content/_includes/_layouts/page.liquid'): [ './content/_includes/_layouts/page.11tydata.js', './content/_includes/_layouts/page.11tydata.json', './content/_includes/_layouts/page.json', './content/_includes/_layouts/_layouts.11tydata.js', './content/_includes/_layouts/_layouts.11tydata.json', './content/_includes/_layouts/_layouts.json', './content/_includes/_includes.11tydata.js', './content/_includes/_includes.11tydata.json', './content/_includes/_includes.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:TemplateData Using '.11tydata' to find data files. +0ms
  Eleventy:TemplateData getLocalDataPaths('./content/_includes/_layouts/post.liquid'): [ './content/_includes/_layouts/post.11tydata.js', './content/_includes/_layouts/post.11tydata.json', './content/_includes/_layouts/post.json', './content/_includes/_layouts/_layouts.11tydata.js', './content/_includes/_layouts/_layouts.11tydata.json', './content/_includes/_layouts/_layouts.json', './content/_includes/_includes.11tydata.js', './content/_includes/_includes.11tydata.json', './content/_includes/_includes.json', './content/content.11tydata.js', './content/content.11tydata.json', './content/content.json' ] +0ms
  Eleventy:EleventyErrorHandler Problem writing Eleventy templates: +0ms
  Eleventy:EleventyErrorHandler TemplateLayoutPathResolver directory does not exist for page.liquid: _includes
  Eleventy:EleventyErrorHandler 
  Eleventy:EleventyErrorHandler `Error` was thrown: +1ms
  Eleventy:EleventyErrorHandler (error stack): Error: TemplateLayoutPathResolver directory does not exist for page.liquid: _includes
  Eleventy:EleventyErrorHandler     at TemplateLayoutPathResolver.findFileName (/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:96:13)
  Eleventy:EleventyErrorHandler     at TemplateLayoutPathResolver.init (/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:61:28)
  Eleventy:EleventyErrorHandler     at new TemplateLayoutPathResolver (/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/@11ty/eleventy/src/TemplateLayoutPathResolver.js:15:10)
  Eleventy:EleventyErrorHandler     at new TemplateLayout (/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/@11ty/eleventy/src/TemplateLayout.js:15:24)
  Eleventy:EleventyErrorHandler     at Function.getTemplate (/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/@11ty/eleventy/src/TemplateLayout.js:38:16)
  Eleventy:EleventyErrorHandler     at Template.getData (/media/donblanco/mediafiles/Documents/Projects/Web Sites/blogging/11ty/thedixons-11ty/node_modules/@11ty/eleventy/src/Template.js:218:37) +0ms
Processed 0 files in 0.29 seconds (v0.9.0)
  Eleventy Finished writing templates. +284ms
  Eleventy 
  Eleventy Getting frustrated? Have a suggestion/feature request/feedback?
  Eleventy I want to hear it! Open an issue: https://github.com/11ty/eleventy/issues/new +0ms
  Eleventy:Template getMappedDate: using file created time for './content/_includes/_layouts/page.liquid' of 2019-09-22T03:28:58.990Z (from 1569122938990.8193) +0ms
  Eleventy:TemplateWriter ./content/_includes/_layouts/page.liquid added to map. +347ms
  Eleventy:Template getMappedDate: using file created time for './content/_includes/_layouts/post.liquid' of 2019-09-22T03:28:47.091Z (from 1569122927091.8452) +1ms
  Eleventy:TemplateWriter ./content/_includes/_layouts/post.liquid added to map. +1ms
  Eleventy:TemplatePassthroughManager Copied './assets' +392ms
  Eleventy:TemplatePassthroughManager TemplatePassthrough copy finished. Current count: 1 +1ms


Start time: (2019-09-22 12:52:18 UTC) [treshold=1%]
 #  module                           time  %
 1  text-table (no...ble/index.js)   46ms  β–‡ 2%
 2  date-time (nod...ime/index.js)   27ms  β–‡ 1%
 3  parse-ms (node...-ms/index.js)   26ms  β–‡ 1%
 4  pretty-ms (nod...-ms/index.js)   52ms  β–‡ 2%
 5  has-color (nod...lor/index.js)   36ms  β–‡ 2%
 6  chalk (node_mo...alk/index.js)   54ms  β–‡ 2%
 7  fs-extra (node...lib/index.js)   77ms  β–‡β–‡ 3%
 8  ./TemplatePath...platePath.js)   89ms  β–‡β–‡ 4%
 9  micromatch (no...tch/index.js)   24ms  β–‡ 1%
10  ./pattern (nod...s/pattern.js)   29ms  β–‡ 1%
11  ../utils/index...ils/index.js)   37ms  β–‡ 2%
12  ./managers/tas...ers/tasks.js)   38ms  β–‡ 2%
13  ../readers/str...rs/stream.js)   28ms  β–‡ 1%
14  ./providers/as...ers/async.js)   34ms  β–‡ 1%
15  ./settings (no.../settings.js)   27ms  β–‡ 1%
16  fast-glob (nod...out/index.js)  103ms  β–‡β–‡ 5%
17  ./_castPath (n..._castPath.js)   25ms  β–‡ 1%
18  ./_baseSet (no.../_baseSet.js)   43ms  β–‡ 2%
19  lodash/set (no...odash/set.js)   44ms  β–‡ 2%
20  ./_baseMerge (...baseMerge.js)   27ms  β–‡ 1%
21  lodash/merge (...ash/merge.js)   37ms  β–‡ 2%
22  @babel/parser...lib/index.js)    47ms  β–‡ 2%
23  node-source-wa...alk/index.js)   48ms  β–‡ 2%
24  module-definit...ion/index.js)   51ms  β–‡ 2%
25  detective-amd...amd/index.js)    27ms  β–‡ 1%
26  gonzales-pe (n.../gonzales.js)   77ms  β–‡β–‡ 3%
27  detective-less...ess/index.js)   79ms  β–‡β–‡ 3%
28  ./terminal-hig...highlight.js)   23ms  β–‡ 1%
29  ./css-syntax-e...tax-error.js)   28ms  β–‡ 1%
30  ./node (node_m.../lib/node.js)   34ms  β–‡ 1%
31  ./declaration...claration.js)    36ms  β–‡ 2%
32  ./lazy-result...zy-result.js)    25ms  β–‡ 1%
33  ./processor (n...processor.js)   27ms  β–‡ 1%
34  postcss (node_...b/postcss.js)   71ms  β–‡ 3%
35  detective-post...ist/index.js)   94ms  β–‡β–‡ 4%
36  typescript (no...ypescript.js)  707ms  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 31%
37  ./ast-converte...converter.js)   24ms  β–‡ 1%
38  @typescript-es...st/parser.js)  756ms  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 33%
39  detective-type...ipt/index.js)  758ms  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 33%
40  precinct (node...nct/index.js)     1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 45%
41  dependency-tre...ree/index.js)     1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 45%
42  ./UserConfig (...serConfig.js)   35ms  β–‡ 2%
43  ./EleventyConf...ntyConfig.js)   41ms  β–‡ 2%
44  ./TemplateConf...ateConfig.js)   1.1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 49%
45  ./Config (node...rc/Config.js)   1.1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 50%
46  ../EleventyExt...ensionMap.js)   1.1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 50%
47  ./Engines/Temp...ateEngine.js)   1.1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 50%
48  ./TemplateRend...ateRender.js)   1.1s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 50%
49  ./TemplateData...plateData.js)   1.3s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 58%
50  ./schema/defau...ault_safe.js)   23ms  β–‡ 1%
51  esprima (node_...t/esprima.js)   34ms  β–‡ 1%
52  ../type/js/fun.../function.js)   36ms  β–‡ 2%
53  ./schema/defau...ault_full.js)   40ms  β–‡ 2%
54  ./js-yaml/load...ml/loader.js)   70ms  β–‡ 3%
55  ./lib/js-yaml....b/js-yaml.js)   80ms  β–‡β–‡ 4%
56  js-yaml (node_...aml/index.js)   81ms  β–‡β–‡ 4%
57  ./engines (nod...b/engines.js)   82ms  β–‡β–‡ 4%
58  ./lib/defaults.../defaults.js)   85ms  β–‡β–‡ 4%
59  gray-matter (n...ter/index.js)   98ms  β–‡β–‡ 4%
60  ./TemplateCont...teContent.js)  103ms  β–‡β–‡ 5%
61  ./Template (no.../Template.js)  123ms  β–‡β–‡ 5%
62  globby (node_m...bby/index.js)   25ms  β–‡ 1%
63  del (node_modu...del/index.js)   33ms  β–‡ 1%
64  ./lib/copy (no.../lib/copy.js)   61ms  β–‡ 3%
65  recursive-copy...opy/index.js)   62ms  β–‡ 3%
66  ./TemplatePass...ssthrough.js)   63ms  β–‡ 3%
67  ./TemplatePass...ghManager.js)   64ms  β–‡ 3%
68  ./EleventyFile...entyFiles.js)   66ms  β–‡ 3%
69  ./TemplateWrit...ateWriter.js)  218ms  β–‡β–‡β–‡ 10%
70  ./src/Eleventy.../Eleventy.js)   1.6s  β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 72%
71  ./common/utils...mon/utils.js)   23ms  β–‡ 1%
72  ./lib/ (node_m...lib/index.js)   76ms  β–‡β–‡ 3%
73  markdown-it (n...-it/index.js)   77ms  β–‡β–‡ 3%
74  ./Markdown (no.../Markdown.js)   79ms  β–‡β–‡ 3%
75  ./Liquid (node...es/Liquid.js)   27ms  β–‡ 1%
Total require(): 1272
Total time: 2.3s

I also tried moving layouts up one level. I also copied the .liquid files to both includes and layouts folders. Debug results same.

One slight difference - now debug can not find _includes for post.liquid, so neither pages NOR posts are being generated...

UPDATE: While I would still like to know what was going on there, it's not urgent. I have started over using the eleventy base blog and so far everything is building and working as expected. Yaml has been adjusted, nunjucks templates have been tweaked, image paths and layout references changed, all good! It's all CSS from here.

Change input: "content" for input: "." and run eleventy from that directory.

no idea why this is still open!

I encountered this error today, and I was stumped. For some unknown reason, opening and saving the .eleventy.js file knocked something loose. Now it works. :man_shrugging:

@dixonge, I also get the error if I mistakenly try to run npx eleventy --serve from a directory other than the root. Is that what happened? (Of course, it’s not a very intuitive error message in that instance.)

Any solution for this? @reubenlillie @dixonge

i'm getting the same error when trying to deploy with Netlify - tried the opening .eleventy.js trick to see if that would work but still no dice for me!

@desirottman , try making edits to your .eleventy.js file. that's how I solved it. Most probably, there's some error in that file.

I found that I had added a blank line at the end of the .eleventy.js file to cause this issue. Using Sublime text editor in Windows.

I still have no luck. I don't have any blank lines in .eleventy.js

same here. no blank lines, still getting the error.

@desithorne What exactly is the problem behavior here?

In my case, the problem was I created eleventy.js without the .. It should be .eleventy.js 😐

I had a similar problem and am posting my solution here in case it helps others. My errors only came up when trying to run netlify dev as I'm using Netlify to add some serverless functions, etc.

I put all of my source code in a /src/ directory in my repo and then pointed to it when calling all my scripts:

package.json

  "scripts": {
    "build": "npx @11ty/eleventy --input=src",
    "start": "npx @11ty/eleventy --input=src --serve",
    "watch": "npx @11ty/eleventy --input=src --watch",
    "debug": "DEBUG=* npx @11ty/eleventy --input=src"
  }

Turns out, the default directories were still being queried for in the build. I moved my input directory config to the .eleventy.js file, and I no longer get the error:

module.exports = function (eleventyConfig) {
  // Input directory: src
  // Output directory: _site
  eleventyConfig.addPassthroughCopy("src/style.css")
  eleventyConfig.addPassthroughCopy("src/images/")
  eleventyConfig.setDataDeepMerge(true);
  eleventyConfig.setTemplateFormats("html,njk");

  return {
    dir: {
      input: "src"
    }
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

zachleat picture zachleat  Β·  3Comments

zac-heisey picture zac-heisey  Β·  3Comments

smaimon picture smaimon  Β·  3Comments

nilsmielke picture nilsmielke  Β·  4Comments

kaloja picture kaloja  Β·  3Comments