Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table-of-contents plugin import issue with node v15.10 #2031

Open
TonySpegel opened this issue May 12, 2022 · 0 comments
Open

table-of-contents plugin import issue with node v15.10 #2031

TonySpegel opened this issue May 12, 2022 · 0 comments
Assignees
Labels
priority: low Severity level: 3

Comments

@TonySpegel
Copy link

Description of the issue

When trying to import
const pluginToc = require('@patternfly/pfe-tools/11ty/plugins/table-of-contents.cjs');
into the .eleventy.js config file with node v15.10 one would get a similar issue to the one below

[email protected] watch
npx @11ty/eleventy --watch

[11ty] Eleventy CLI Fatal Error: (more in DEBUG output)
[11ty] 1. Error in your Eleventy config file '/Users/tony/Dev/misc/11ty-base-blog-toc/.eleventy.js'. You may need to run `npm install`. (via EleventyConfigError)
[11ty] 2. Cannot find module '/Users/tony/Dev/misc/11ty-base-blog-toc/node_modules/@patternfly/pfe-tools/11ty/plugins/table-of-contents.cjs.js' (via Error)
[11ty] 
[11ty] Original error stack trace: Error: Cannot find module '/Users/tony/Dev/misc/11ty-base-blog-toc/node_modules/@patternfly/pfe-tools/11ty/plugins/table-of-contents.cjs.js'

Impacted component(s)

  • @patternfly/pfe-tools/11ty/plugins/table-of-contents.cjs

Steps to reproduce

  1. Go to this MWE and clone it
  2. Change into that directory and run npm i in a terminal
  3. Run npm run watch in a terminal
  4. Check console
  5. See error

Expected behavior

Being able to import the plugin w/o issues

@TonySpegel TonySpegel added the priority: low Severity level: 3 label May 12, 2022
@bennypowers bennypowers self-assigned this May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: low Severity level: 3
Projects
None yet
Development

No branches or pull requests

2 participants