Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix 'ERR_OSSL_EVP_UNSUPPORTED' ERROR in vue?

Tags:

node.js

vue.js

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

Node.js v17.4.0

When npm run service is performed, this error occurs. Currently, node is v16.14.0 version, and the same error is repeated even though it was continuously reinstalled 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 a problem occurs again when building an image with a docker. Is there a solution?

like image 464
곽동현 Avatar asked Nov 24 '25 06:11

곽동현


1 Answers

In Windows I was able to resolve this error using the following:

"scripts": {
    "serve": "set NODE_OPTIONS=--openssl-legacy-provider &&  vue-cli-service serve",
    ...
}
like image 170
Ryan Farmer Avatar answered Nov 26 '25 23:11

Ryan Farmer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!