Notice
Recent Posts
Recent Comments
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Archives
Today
Total
관리 메뉴

하는 데 의의를 둬春

[React build 오류] Error: Cannot find module 'node:path' Require stack~ 본문

카테고리 없음

[React build 오류] Error: Cannot find module 'node:path' Require stack~

Shonir00ng 2024. 4. 20. 16:37
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:80:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (C:\myReact\react-movie-app\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\myReact\react-movie-app\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\myReact\react-movie-app\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\myReact\react-movie-app\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\myReact\react-movie-app\node_modules\react-scripts\scripts\build.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:80:19)
    at Object.createHash (node:crypto:139:10)
    at module.exports (C:\myReact\react-movie-app\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:417:16)
    at C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:452:10
    at C:\myReact\react-movie-app\node_modules\webpack\lib\NormalModule.js:323:13
    at C:\myReact\react-movie-app\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at C:\myReact\react-movie-app\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (C:\myReact\react-movie-app\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at C:\myReact\react-movie-app\node_modules\babel-loader\lib\index.js:59:103
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [
    'error:03000086:digital envelope routines::initialization error',
    'error:0308010C:digital envelope routines::unsupported'
  ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.12.2​

 

node_modules, package-lock.json 삭제한 후

npm install 계속 했는데 안됨!!

 

노드 최신버전으로 다운로드 받고 위의 과정을 반복하니 오류가 바뀌었다.

 

 

 

Error: Cannot find module 'node:path' Require stack:
- C:\myReact\react-movie-app\node_modules\npm\node_modules\@npmcli\config\lib\index.js
- C:\myReact\react-movie-app\node_modules\npm\lib\npm.js
- C:\myReact\react-movie-app\node_modules\npm\lib\cli-entry.js
- C:\myReact\react-movie-app\node_modules\npm\lib\cli.js
- C:\myReact\react-movie-app\node_modules\npm\bin\npm-cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object.<anonymous> (C:\myReact\react-movie-app\node_modules\npm\node_modules\@npmcli\config\lib\index.js:7:36)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
{ code: 'MODULE_NOT_FOUND', 
requireStack: [ 
'C:\\myReact\\react-movie-app\\node_modules\\npm\\node_modules\\@npmcli\\config\\lib\\index.js', 
'C:\\myReact\\react-movie-app\\node_modules\\npm\\lib\\npm.js', 
'C:\\myReact\\react-movie-app\\node_modules\\npm\\lib\\cli-entry.js', 
'C:\\myReact\\react-movie-app\\node_modules\\npm\\lib\\cli.js', 
'C:\\myReact\\react-movie-app\\node_modules\\npm\\bin\\npm-cli.js' ] }

 

npm install --save --save-exact react-scripts@5.0.0

 

react-scripts를 업데이트 하니 잘 돌아간다.

Comments