Home  >  Q&A  >  body text

Solve 'ERR_OSSL_EVP_UNSUPPORTED' error in vue

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粉785522400P粉785522400207 days ago523

reply all(1)I'll reply

  • P粉738346380

    P粉7383463802024-03-26 12:17:41

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

    "scripts": {
        "serve": "set NODE_OPTIONS=--openssl-legacy-provider &&  vue-cli-service serve",
        ...
    }
    

    reply
    0
  • Cancelreply