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

fix: Ensure CLI works out-of-the-box on Node 16+ #1774

Merged
merged 4 commits into from
Jan 14, 2023
Merged

Conversation

rschristian
Copy link
Member

@rschristian rschristian commented Jan 14, 2023

What kind of change does this PR introduce?

Bit of a hacky fix

Did you add tests for your changes?

No

Summary

We've had a lot of issues regarding Webpack failing on Node 16+: #1643, #1688, #1748, #1773

Edit: Also has come up on Slack at least once

Rather than continue to field the same questions, this PR injects the necessary config (NODE_OPTIONS=--openssl-legacy-provider) if this is one of our templates and the user's Node version is above v16.0.0.

It's a bit hacky, but gets the job done.

Does this PR introduce a breaking change?

No, only affects newly created projects for users on Node versions greater than v16.0.0

@rschristian rschristian requested a review from a team as a code owner January 14, 2023 18:35
@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2023

🦋 Changeset detected

Latest commit: 814f8e8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rschristian rschristian merged commit 05ba4b2 into master Jan 14, 2023
@rschristian rschristian deleted the fix/node-opts-16+ branch January 14, 2023 19:14
@preact-bot preact-bot mentioned this pull request Jan 14, 2023
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 this pull request may close these issues.

None yet

1 participant