trakanom / Portfolio-Site

Under construction
0 stars 0 forks source link

Resolved - Build Failure with Node.js v18.18.0 Due to SSL Error #4

Closed trakanom closed 11 months ago

trakanom commented 11 months ago

Issue Title: Resolved - Build Failure with Node.js v18.18.0 Due to SSL Error

Resolution Summary:

The build failure issue, which was occurring due to an SSL-related error with Node.js v18.18.0, has been resolved by modifying the build script in the package.json file.

Implemented Solution:

Changed the build script in package.json to utilize the --openssl-legacy-provider flag with react-scripts:

"scripts": {
    "build": "react-scripts --openssl-legacy-provider build",
    ...
}

Explanation:

The --openssl-legacy-provider flag ensures that Node.js uses the legacy provider for OpenSSL, mitigating the SSL-related error (ERR_OSSL_EVP_UNSUPPORTED) encountered during the build process.

Verification:

After implementing the change, running yarn build successfully builds the project without throwing the SSL error.

Additional Notes:

Attachments: