search

Home  >  Q&A  >  body text

openssl error stack:

<p><pre class="brush:php;toolbar:false;">opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' }</pre> <p>I get this error when I switch to node v18</p>
P粉851401475P粉851401475492 days ago523

reply all(2)I'll reply

  • P粉988025835

    P粉9880258352023-08-25 00:33:37

    Perform the following steps in the current application directory on the terminal:

    npm install -g npm-check-updates

    Install the npm-check-updates package globally to do exactly what its name says.

    ncu

    This will display the dependency side by side with its new version (it is recommended that you upgrade to) the version listed in (the arrow points to) the package.json file in the current directory.

    ncu -u

    This will update your package.json file with the new version listed and prepare your application for the next step (correct update).

    npm update

    or

    npm install

    Both of these will eventually install new updates; fixing the problem.


    Note: I have used

    npm install

    I ran into this issue using an old React.js app cloned from github but didn't want to downgrade to an older node version since I just upgraded from node v14 to v18.13.0. Again, downgrading is not a safe option. There are many reasons for updating; most of the time, "security reasons", especially in the JavaScript world.

    reply
    0
  • P粉505450505

    P粉5054505052023-08-25 00:15:16

    Now there are two options -

    1. Try uninstalling Node.js version 17 and reinstalling Node.js version 16

    You can reinstall the current LTS Node.js version from its official website . Or download more specific content from here;

    You can use NVM (Node Version Manager)

    • Linux and Mac users can use this nvm package Link
    • Windows users can use this nvm package Link
    1. Open a terminal and follow the instructions to paste these:

    Linux and macOS (Windows Git Bash)-

    export NODE_OPTIONS=--openssl-legacy-provider

    Windows Command Prompt-

    set NODE_OPTIONS=--openssl-legacy-provider

    Windows PowerShell-

    $env:NODE_OPTIONS = "--openssl-legacy-provider"

    reply
    0
  • Cancelreply