opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error‘ ], library

Today, when I use node to initialize the project made by vue-cli scaffolding and run it, the following error is thrown:
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED'
After checking, it is found that the node version is too high. When I was doing this project before, I used node 16.**** Now Using node 18.***, you can execute the following command in the black window to solve this problem:

set NODE_OPTIONS=--openssl-legacy-provider

Screenshot of the problem!
insert image description here
Then restart the project to solve it perfectly! ! !
insert image description here

Guess you like

Origin blog.csdn.net/apple_51931783/article/details/129232309