[Error] digital envelope routines::unsupported

KoK·2023년 1월 27일
1

Angular

목록 보기
1/1

Angular 프로젝트를 돌리려고 ng serve를 터미널에 입력했는데 에러가 뜸...

[터미널 내용]

jeon-ye-eun@jeon-yeeun-ui-MacBookPro segment-frontend % ng serve
Your global Angular CLI version (15.1.3) is greater than your local version (11.2.19). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Option "aot" is deprecated: Use the "aot" option in the browser builder instead.
Warning: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues. You might need to use "--disableHostCheck" if that's the
case.
Warning: Running a server with --disable-host-check is a security risk. See https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a for more information.
⠋ Generating browser application bundles...[HPM] Proxy created: [ '/api', '/oauth2', '/login', '/logout' ]  ->  {
  host: 'dev-segment.metatron.bundang10f.io',
  protocol: 'http:',
  port: 80
}
[HPM] Subscribed to http-proxy events:  [ 'error', 'close' ]
⠼ Generating browser application bundles (phase: building)...Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at runSyncOrAsync (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
    at iterateNormalLoaders (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at iterateNormalLoaders (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
    at /Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:236:3
    at context.callback (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at Object.loader (/Users/jeon-ye-eun/Documents/Elena/Practice/segment-browser/segment-frontend/node_modules/css-loader/dist/index.js:183:3) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.13.0
jeon-ye-eun@jeon-yeeun-ui-MacBookPro segment-frontend %

npm install, ng serve 모두 이런 에러가 뜸…
에러에 관해 찾아보니 nodejs 버전을 16으로 바꾸라는 얘기가 있어서 이를 참고해 버전을 변경함!
원래 내가 설치해 놓은 버전은 v18.13.0 → v16.9.0
바꿨더니 잘 돌아감!!!ㅠㅠ

[참조]
https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported?page=1&tab=scoredesc#tab-top

profile
100% + 100%

0개의 댓글