11ty / eleventy

A simpler site generator. Transforms a directory of templates (of varying types) into HTML.

Home Page:https://www.11ty.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPM version 0.12.1 is missing "ignores" in UserConfig.js

WyattJChalifoux opened this issue · comments

Describe the bug
I am trying to use eleventyConfig.ignores.add() in my .eleventy.js file, and get the following error:

`EleventyConfigError` was thrown
> Cannot read properties of undefined (reading 'add')`

To Reproduce
Steps to reproduce the behavior:

  1. Install 11ty like so: npm install --save-dev @11ty/eleventy
  2. Add eleventyConfig.ignores.add("index.html"), you can use any input to add().
  3. Run 11ty: npx @11ty/eleventy
  4. See error

Expected behavior
A normal successful 11ty build of the project.

Screenshots
image

Console Log:

UserConfig {
  events: EventEmitter {
    _events: [Object: null prototype] {},
    _eventsCount: 0,
    _maxListeners: undefined,
    [Symbol(kCapture)]: false
  },
  collections: {},
  templateFormats: undefined,
  liquidOptions: {},
  liquidTags: {},
  liquidFilters: {
    slug: [Function (anonymous)],
    url: [Function (anonymous)],
    log: [Function (anonymous)],
    getCollectionItem: [Function (anonymous)],
    getPreviousCollectionItem: [Function (anonymous)],
    getNextCollectionItem: [Function (anonymous)]
  },
  liquidShortcodes: {},
  liquidPairedShortcodes: {},
  nunjucksFilters: {
    slug: [Function (anonymous)],
    url: [Function (anonymous)],
    log: [Function (anonymous)],
    getCollectionItem: [Function (anonymous)],
    getPreviousCollectionItem: [Function (anonymous)],
    getNextCollectionItem: [Function (anonymous)]
  },
  nunjucksAsyncFilters: {},
  nunjucksTags: {},
  nunjucksShortcodes: {},
  nunjucksAsyncShortcodes: {},
  nunjucksPairedShortcodes: {},
  nunjucksAsyncPairedShortcodes: {},
  handlebarsHelpers: {
    slug: [Function (anonymous)],
    url: [Function (anonymous)],
    log: [Function (anonymous)],
    getCollectionItem: [Function (anonymous)],
    getPreviousCollectionItem: [Function (anonymous)],
    getNextCollectionItem: [Function (anonymous)]
  },
  handlebarsShortcodes: {},
  handlebarsPairedShortcodes: {},
  javascriptFunctions: {
    slug: [Function (anonymous)],
    url: [Function (anonymous)],
    log: [Function (anonymous)],
    getCollectionItem: [Function (anonymous)],
    getPreviousCollectionItem: [Function (anonymous)],
    getNextCollectionItem: [Function (anonymous)]
  },
  pugOptions: {},
  ejsOptions: {},
  markdownHighlighter: null,
  libraryOverrides: {},
  passthroughCopies: { './src/': true },
  layoutAliases: {},
  linters: {},
  filters: {},
  activeNamespace: '',
  DateTime: [class DateTime],
  dynamicPermalinks: true,
  useGitIgnore: true,
  dataDeepMerge: false,
  extensionMap: Set(0) {},
  watchJavaScriptDependencies: true,
  additionalWatchTargets: [ './src/' ],
  browserSyncConfig: {},
  chokidarConfig: {},
  watchThrottleWaitTime: 0,
  dataExtensions: Map(0) {},
  quietMode: false
}

image
image

Environment:

  • OS and Version: Windows 10
  • Eleventy Version: 0.12.1

Configuration API for Ignores is a 1.0+ feature, sorry!

https://www.11ty.dev/docs/ignores/#configuration-api