chore:fix: restrict node engine versions #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into the following error when running
yarn demo
with node versions higher than17.0.0
:It looks like it is due to Node 17.0.0 starting to use OpenSSL3
webpack/webpack#14532 (comment)
It can be solved for instance by:
package.json
--openssl-legacy-provider
NODE_OPTIONS
flag as suggested hereI suggest the first solution because
--openssl-legacy-provider
, it will raise questions when one sees it used in a scriptengines
inpackage.json
is probably a more common way to avoid such compatibility issues.Test plan
main
branch:yarn demo
using NodeJS version >= 17.0.0: you'll see the error message mentioned aboveyarn demo
using NodeJS >= 16.0.0 < 17.0.0: script will execute without issuesYou'll be warned that you must use a node version between 16.0.0 and 17.0.0 to run the script
(I didn't test with versions lower than 16.0.0)