Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

use --openssl-legacy-provider flag when running node 17 #2116

Merged
merged 2 commits into from
Nov 2, 2021

Conversation

caass
Copy link
Contributor

@caass caass commented Nov 1, 2021

Closes #2108

Node 17 uses openssl 3 by default, which is not
compatible with webpack 4. This change adds a check to see if
the user is running node 17, and if they are, we add the appropriate
flag to the call to node (https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V17.md#openssl-30)

See #2108: Node 17 uses openssl 3 by default, which is not
compatible with webpack 4. This change adds a check to see if
the user is running node 17, and if they are, we add the appropriate
flag to the call to node (https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V17.md#openssl-30)
@Electroid
Copy link
Contributor

What if we just always pipe this argument? Will node complain that it does not exist in older versions?

@threepointone
Copy link
Contributor

node throws on bad options, so the check is required.

Copy link
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving, but looks like you'll have to fix the RUSTESCs as well. Feel free to merge this in if you're doing those soon.

@caass caass merged commit 34eca00 into master Nov 2, 2021
@delete-merged-branch delete-merged-branch bot deleted the cass/use-openssl-legacy-provider branch November 2, 2021 15:46
@nataliescottdavidson nataliescottdavidson mentioned this pull request Nov 9, 2021
@artob
Copy link

artob commented Dec 17, 2021

Note that this feature is causing a lot of trouble for some, including with Homebrew on macOS and with Arch Linux: #2155 (comment)

To quote #2155 (comment):

It looks like wrangler makes an assumption for a key openssl-legacy-provider based on nodejs version, but the heuristic is a bit more complex.

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

Successfully merging this pull request may close these issues.

Wrangler is not compatible with Node.js 17 / OpenSSL 3.0
4 participants