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

change engine to "node": "^18.17.1 || >=20.10.0" #299

Closed
vickytnz opened this issue Jul 2, 2024 · 1 comment · Fixed by #300
Closed

change engine to "node": "^18.17.1 || >=20.10.0" #299

vickytnz opened this issue Jul 2, 2024 · 1 comment · Fixed by #300

Comments

@vickytnz
Copy link

vickytnz commented Jul 2, 2024

I tried to run this but got the error:

URL.canParse is not a function

On some searching is is because the node version needs to be 18.17.1 or higher nodejs/corepack#359 (review) (which I didn't have) - however the package suggests

Node guidance would mean making the engine

"node": "^18.17.1 || >=20.10.0"

@frankieroberto
Copy link
Collaborator

@vickytnz good spot!

This template has govuk-eleventy-plugin as a dependency which specified "node": ">=18.17" as its engine, so I'll update it to that for now.

Incidentally, if you run npm install with node 18.16.0 or below you should get this helpful-ish warning (but it’s only a warning so can be ignored):

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@x-govuk/govuk-eleventy-plugin@6.2.4',
npm WARN EBADENGINE   required: { node: '>=18.17' },
npm WARN EBADENGINE   current: { node: 'v18.16.0', npm: '9.8.1' }
npm WARN EBADENGINE }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants