Description
Contributors using Node.js v17 or later encounter a build error due to changes in OpenSSL handling. This error occurs when running docusaurus commands and is linked to the incompatibility of OpenSSL settings in newer Node.js versions. To enhance compatibility across different Node.js versions, we should add the NODE_OPTIONS=--openssl-legacy-provider flag directly in our package.json scripts.
Proposed Solution
Update the start and build scripts in package.json to include the NODE_OPTIONS flag. This will set the OpenSSL legacy provider and ensure compatibility without requiring contributors to manually adjust environment variables or downgrade their Node.js version.
Changes to Make
Update the package.json scripts as follows:
"scripts": {
"start": "NODE_OPTIONS=--openssl-legacy-provider docusaurus start",
"swizzle": "docusaurus swizzle",
"build": "NODE_OPTIONS=--openssl-legacy-provider docusaurus build",
"publish-gh-pages": "docusaurus deploy"
}
Further
I am working on that issue
Description
Contributors using Node.js v17 or later encounter a build error due to changes in OpenSSL handling. This error occurs when running
docusauruscommands and is linked to the incompatibility of OpenSSL settings in newer Node.js versions. To enhance compatibility across different Node.js versions, we should add theNODE_OPTIONS=--openssl-legacy-providerflag directly in ourpackage.jsonscripts.Proposed Solution
Update the
startandbuildscripts inpackage.jsonto include theNODE_OPTIONSflag. This will set the OpenSSL legacy provider and ensure compatibility without requiring contributors to manually adjust environment variables or downgrade their Node.js version.Changes to Make
Update the
package.jsonscripts as follows:Further
I am working on that issue