search

Home  >  Q&A  >  body text

Error message "Error: 0308010C: Digital envelope routine::not supported"

<p>我创建了默认的 IntelliJ IDEA React 项目并得到了这个:</p> <pre class="brush:none;toolbar:false;">Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:130:10) at module.exports (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:471:10) at /Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:503:5 at /Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:358:12 at /Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:221:10) /Users/user/Programming Documents/WebServer/untitled/node_modules/react-scripts/scripts/start.js:19 throw err; ^ </pre> <p>这似乎是最近出现的问题 - <em>webpack 4 天前遇到了这个问题,并且仍在处理中</em>。</p>
P粉680487967P粉680487967457 days ago832

reply all(2)I'll reply

  • P粉864872812

    P粉8648728122023-08-24 09:09:13

    You can try one of the following:

    <强>1. Downgrade to Node.js v16.

    • You can reinstall the current LTS version from the Node.js website.

    • You can also use nvm. For Windows, use nvm-windows.

    <强>2. Enable legacy OpenSSL provider.

    On Unix-like systems (Linux, macOS, Git bash, etc.):

    export NODE_OPTIONS=--openssl-legacy-provider
    

    In Windows command prompt:

    set NODE_OPTIONS=--openssl-legacy-provider

    On PowerShell:

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

    refer to

    reply
    0
  • P粉573809727

    P粉5738097272023-08-24 00:48:17

    In your package.json: change this line

    "start": "react-scripts start"
    

    to

    "start": "react-scripts --openssl-legacy-provider start"
    

    reply
    0
  • Cancelreply