Skip to content

Issue: Ensure Cross-Version Node.js Compatibility with OpenSSL Legacy Provider #49

@iamridoydey

Description

@iamridoydey

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

### Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions