ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Nestjs V8 -> V9 마이그레이션 하기
    Nest.js 2023. 5. 23. 08:29
    728x90

    https://www.npmjs.com/package/npm-check-updates

    안전상의 이유로 nest update는 없어졌다. 공식 홈페이지에서 안내한대로

    1. ncu를 이용한다.

    $ npm install -g npm-check-updates
    $ npx npm-check-updates
    $ ncu
    $ ncu -u

    아래는 결과값


    @nestjs/cli                         ^8.0.0  →    ^9.5.0
     @nestjs/common                      ^8.0.0  →    ^9.4.1
     @nestjs/config                      ^2.2.0  →    ^2.3.2
     @nestjs/core                        ^8.0.0  →    ^9.4.1
     @nestjs/jwt                         ^9.0.0  →   ^10.0.3
     @nestjs/passport                    ^9.0.0  →    ^9.0.3
     @nestjs/platform-express            ^8.0.0  →    ^9.4.1
     @nestjs/schematics                  ^8.0.0  →    ^9.2.0
     @nestjs/testing                     ^8.0.0  →    ^9.4.1
     @types/express                    ^4.17.13  →  ^4.17.17
     @types/jest                         27.4.1  →    29.5.1
     @types/jsonwebtoken                 ^8.5.9  →    ^9.0.2
     @types/node                        ^16.0.0  →   ^20.2.3
     @types/nodemailer                   ^6.4.6  →    ^6.4.8
     @types/supertest                   ^2.0.11  →   ^2.0.12
     @types/uuid                         ^8.3.4  →    ^9.0.1
     @typescript-eslint/eslint-plugin    ^5.0.0  →   ^5.59.7
     @typescript-eslint/parser           ^5.0.0  →   ^5.59.7
     class-validator                    ^0.13.2  →   ^0.14.0
     eslint                              ^8.0.1  →   ^8.41.0
     eslint-config-prettier              ^8.3.0  →    ^8.8.0
     eslint-plugin-prettier              ^4.0.0  →    ^4.2.1
     jest                               ^27.2.5  →   ^29.5.0
     joi                                ^17.6.4  →   ^17.9.2
     jsonwebtoken                        ^8.5.1  →    ^9.0.0
     nest-winston                        ^1.8.0  →    ^1.9.2
     nodemailer                          ^6.8.0  →    ^6.9.2
     openai                              ^3.1.0  →    ^3.2.1
     pg                                  ^8.8.0  →   ^8.11.0
     prettier                            ^2.3.2  →    ^2.8.8
     rimraf                              ^3.0.2  →    ^5.0.1
     rxjs                                ^7.2.0  →    ^7.8.1
     source-map-support                 ^0.5.20  →   ^0.5.21
     supertest                           ^6.1.3  →    ^6.3.3
     ts-jest                            ^27.0.3  →   ^29.1.0
     ts-loader                           ^9.2.3  →    ^9.4.2
     ts-node                            ^10.0.0  →   ^10.9.1
     tsconfig-paths                     ^3.10.1  →    ^4.2.0
     typeorm                            ^0.3.10  →   ^0.3.16
     typescript                          ^4.3.5  →    ^5.0.4

     

     

    에러발생:
    Error: dlopen(~/node_modules/bcrypt/lib/binding/bcrypt_lib.node, 1): no suitable image found. Did find:...
    $ rm -rf node_modules
    
    $ npm install
    node_modules에서 충돌이 발생한것 같다. node_modules 삭제후 재 install 

    그 이외에 문제는 발생하지 않고 잘 실행된다.
    node 버전도 18.15.0 올리고 Nestjs 버전도 9버전으로 마이그레이션 성공!
    728x90
Designed by Tistory.