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

 Problem Description

When npm run dev , the following error occurs

 My node version is 18.15

The cause of the problem is because of the difference between openssl in node 18 version and node 14 version (old projects could originally run under node14 version)

solution

Find the package.json file and add environment variables

"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",


Then run npm run dev again to return to normal

Guess you like

Origin blog.csdn.net/qq_60575429/article/details/130773035