생계유지형 개발자/Stack Over Flow 한국판

[Node] Error message "error:0308010C:digital envelope routines::unsupported"

이 가을 2024. 5. 2. 11:12

 

# 오류

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; ^

 

# 원인

낮은 버전의(LTS가 아닌) Node를 사용중일 때

# 해결

npm 실행 스크립트에 아래 명령어 추가

export NODE_OPTIONS=--openssl-legacy-provider

// package.json

"scripts": {
		"serve": "export SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --mode localhost --host local.navercorp.com --port 8080",
}

 

같은 명령어를 다른 방법으로도 추가 가능하다.

아래 링크 참고

 

 

 

※ 참고

https://stackoverflow.com/questions/69665222/node-js-17-0-1-gatsby-error-digital-envelope-routinesunsupported-err-os

 

Node.js 17.0.1 Gatsby error - "digital envelope routines::unsupported ... ERR_OSSL_EVP_UNSUPPORTED"

I am building a Gatsby site. I upgraded Node.js to v17.0.1, and when I run a build, there is an error: Error: digital envelope routines::unsupported opensslErrorStack: [ 'error:03000086:digital en...

stackoverflow.com

https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

 

Error message "error:0308010C:digital envelope routines::unsupported"

I created the default IntelliJ IDEA React project and got this: Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHa...

stackoverflow.com