Enforce node version >= 22 for npm install#1234
Conversation
|
Website CI was using node v20 by default (it's not specified). I've updated it to explicitly use v22 for all steps in test.yml so far, which lets this PR pass. Performance note: It'll be worth comparing the CI elapsed run-times for this PR against others to check it is no slower than when it was using the default from update: from the log, this is a good sign: |
This reverts commit 9a30d3b.
|
Thanks, merging! (Is there a similar PR like that should target main?) From your original issue: "a pointer to guide(s) on how to update version (e.g. for nvm)," that would be helpful, though the error output is relatively clear (below is the tail end of output when attempting to install with old version) npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: p5.js-website@0.0.1
npm error notsup Not compatible with your version of node/npm: p5.js-website@0.0.1
npm error notsup Required: {"node":">=22.0.0"}
npm error notsup Actual: {"npm":"11.2.0","node":"v20.17.0"}
npm error A complete log of this run can be found in: [filepath] |
Addresses #1233
package.jsonengine-strict=truedocs/technical_overview.md.As a result, npm install with a sub-22 version of node.js will give the following format of error:
why not devEngines?
Whilst devEngines is a good solution in future, it will be ignored by older platforms.