rimo030 / docker-study

0 stars 0 forks source link

Node.js와 redis 연결이 제대로 되지않는 문제 #2

Closed rimo030 closed 7 months ago

rimo030 commented 7 months ago

도커 빌드시 레디스 클라이언트 생성에 실패하는 에러 발생

/app/node_modules/redis/distindex.js:42

      |             ...options?.modules
      |                        ^
      |
      |     SyntaxError: Unexpected token .
      |     at Module._compile (internal/modules/cjs/loader.js:723:23)
      |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
      |     at Module.load (internal/modules/cjs/loader.js:653:32)
      |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
      |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
      |     at Module.require (internal/modules/cjs/loader.js:692:17)
      |     at require (internal/modules/cjs/helpers.js:25:18)
      |     at Object.<anonymous> (/app/src/server.js:2:15)
      |     at Module._compile (internal/modules/cjs/loader.js:778:30)
      |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
rimo030 commented 7 months ago

Node버전을 최신 LTS(v20.11.0)로 업데이트 후 다시 빌드 시 정상 작동함을 확인했습니다.