1

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'

Roshini
  • 11
  • 3

2 Answers2

0

This error is because of NodeJS being v17 or later.

You will need to follow the following steps:

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.

emp
  • 4,926
  • 2
  • 38
  • 50
0

Set the following environment variable in the shell before running Angular CLI:

export NODE_OPTIONS=--openssl-legacy-provider

see also this answer

user1364368
  • 1,474
  • 1
  • 16
  • 22