NPM version 0.12.1 is missing "ignores" in UserConfig.js
WyattJChalifoux opened this issue · comments
WyattJChalifoux commented
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:
- Install 11ty like so:
npm install --save-dev @11ty/eleventy
- Add
eleventyConfig.ignores.add("index.html")
, you can use any input toadd()
. - Run 11ty:
npx @11ty/eleventy
- See error
Expected behavior
A normal successful 11ty build of the project.
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
}
Environment:
- OS and Version: Windows 10
- Eleventy Version: 0.12.1
Zach Leatherman commented
Configuration API for Ignores is a 1.0+ feature, sorry!