j-f1/eleventy-hast-jsx

Node.js v14 error

mattrossman opened this issue · 2 comments

Just a heads up, I tried using this package and faced some errors with the example code.

E.g. Cannot find module 'node:path' thrown from src/shortcodes.js.

Upgrading my Node.js version from 14 to 16 fixed the issue. I haven't encountered the require("node:path") module syntax before, I assume that's a modern feature?

Might be helpful to specify that version requirement in the README and/or add an "engines" field to the package.json to prevent confusion.

j-f1 commented

Yep, it looks like that was added in Node 16. I’ll add an engines field to package.json.

j-f1 commented

Thanks for the reports! I’ve released v0.3.1 with both your changes.