Solve 'ERR_OSSL_EVP_UNSUPPORTED' error in vue
P粉785522400
P粉785522400 2024-03-25 18:05:41
0
1
566

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

Node.js v17.4.0

This error occurs when executing npm run service. Currently, node is at version v16.14.0, but I still get the same errors when I keep reinstalling them, because these errors occur frequently in node v17.

"scripts": {
    "serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
    "lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint"
},

If you use the above code, it can be executed, but there is a problem again when using docker to build the image. Is there any solution?

P粉785522400
P粉785522400

reply all(1)
P粉738346380

In Windows, I was able to resolve this error using:

"scripts": {
    "serve": "set NODE_OPTIONS=--openssl-legacy-provider &&  vue-cli-service serve",
    ...
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template