Article directory
Problem Description
- My node version is 17.9.1. When running an old project, the following error is reported:
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
solution
-
After investigation: the cause of the problem is because the openssl in the node 17 version is different from the 14 version (the old project could have run under the node14 version)
-
Solution, find the package.json file, add:
set NODE_OPTIONS=--openssl-legacy-provider &&
as follows:"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
-
In the linux environment, add:
export NODE_OPTIONS=--openssl-legacy-provider &&
, as follows:"dev": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",