Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix Angular error opensslErrorStack: [ 'error:03000086 code: 'ERR_OSSL_EVP_UNSUPPORTED'

i am making changes my Angular app after a long time and getting this error. I have done npm install post that ng serve. and getting this error.

opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED'

like image 583
Roshini Avatar asked Jun 05 '26 22:06

Roshini


2 Answers

Open your command prompt / terminal and run the following command:

Windows users

set NODE_OPTIONS=--openssl-legacy-provider

Mac users

export NODE_OPTIONS=--openssl-legacy-provider
            

OR

Downgrade node version

like image 119
Devendra Singh Avatar answered Jun 07 '26 12:06

Devendra Singh


This error is because of NodeJS being v17 or later.

You will need to follow the following steps:

  • Uninstall your current NodeJS version
  • Install NodeJS v16 (https://nodejs.org/download/release/v16.19.1/)
  • Run Angular as usual

If you want to run it with NodeJS > v16 then upgrade your Angular application first to the latest version and install the current NodeJS LTS.

like image 23
emp Avatar answered Jun 07 '26 11:06

emp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!