Closed UpekshaGalappaththi closed 1 year ago
Maybe we can modify the start script to include NODE_OPTIONS=--openssl-legacy-provider
.
cross-env
as a dependency.package.json
start script. "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --mode development --inline --hot --open",
@DonOmalVindula FYI.
This issue is now fixed with asgardeo-auth-react-sdk
v2.0.0. We have added support for node 18 with this version.
However, we are now using the yarn install
command instead of npm install
.
yarn install && npm start
(requires yarn
) will successfully execute as follows.
Describe the issue: Running the sample project with Node LTS 18.12.1 the below error will be triggered.
How to reproduce: Use the Node LTS 18.12.1 and run 'npm install && npm start' in the root folder
Was able to fix the error by exporting 'openssl-legacy-provider'
export NODE_OPTIONS=--openssl-legacy-provider
This error will not occur if the Node.js version is downgraded. Ex - Tried with V16.18.1 and did not face an error
Reason for the issue seems to be that In Node.js v17, a security hole was closed in the SSL provider. This fix was a breaking change that corresponded with similar breaking changes in the SSL packages in NPM. When you attempt to use SSL in Node.js v17 or later without also upgrading those SSL packages in your package.json, then you will see this error.