[NPM] package ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฐฉ๋ฒ•

2023. 3. 27. 04:08ยทServer/Node.js

package ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฐฉ๋ฒ•

ํ”„๋กœ์ ํŠธ์˜ ๋ชจ๋“ˆ์ด '์˜ค๋ž˜๋œ'์ง€ ํ™•์ธํ•˜๋ ค๋ฉด ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•˜์‹ญ์‹œ์˜ค.

npm outdated

'

์˜ค๋ž˜๋œ'์€ package.json์— ์ •์˜๋œ ๋ชจ๋“  ๋ชจ๋“ˆ์„ ํ™•์ธํ•˜๊ณ  NPM ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— ์ตœ์‹  ๋ฒ„์ „์ด ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด xml2js 0.2.6(ํ˜„์žฌ ํ”„๋กœ์ ํŠธ์˜ node_modules์— ์žˆ์Œ)์ด ์ตœ์‹  ๋ฒ„์ „(0.2.7)์ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์— ์˜ค๋ž˜๋˜์—ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ์„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

xml2js@0.2.7 node_modules/xml2js current=0.2.6

๋ชจ๋“  ์ข…์†์„ฑ์„ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด ์ด๊ฒƒ์ด ๋ฐ”๋žŒ์งํ•˜๋‹ค๊ณ  ํ™•์‹ ํ•˜๋Š” ๊ฒฝ์šฐ ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•˜์‹ญ์‹œ์˜ค.

npm update

๋˜๋Š” xml2js์™€ ๊ฐ™์€ ๋‹จ์ผ ์ข…์†์„ฑ์„ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•˜์‹ญ์‹œ์˜ค.

npm update xml2js

package.json ๋ฒ„์ „ ๋ฒˆํ˜ธ๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด --save ํ”Œ๋ž˜๊ทธ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

npm update --save

 

 

๋‹ค๋ฅธ๋ฐฉ๋ฒ•

 

npm outy๋Š” ์—…๋ฐ์ดํŠธํ•ด์•ผํ•˜๋Š” ํŒจํ‚ค์ง€๋ฅผ ์‹๋ณ„ํ•˜๊ณ  npm update <ํŒจํ‚ค์ง€ ์ด๋ฆ„>๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ ํŒจํ‚ค์ง€๋ฅผ ์—…๋ฐ์ดํŠธ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ npm@5.0.0 ์ด์ „์—๋Š” npm ์—…๋ฐ์ดํŠธ <ํŒจํ‚ค์ง€ ์ด๋ฆ„>๊ฐ€ ๋ฌธ์ œ๊ฐ€๋˜๋Š” package.json์˜ ๋ฒ„์ „์„ ์—…๋ฐ์ดํŠธํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์ตœ์ƒ์˜ ์›Œํฌํ”Œ๋กœ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  1. Identify out of date packages with npm outdated
  2. Update the versions in your package.json
  3. Run npm update to install the latest versions of each package

์ด ์›Œํฌํ”Œ๋กœ์— ๋„์›€์ด ๋˜๋Š” npm-check-updates๋ฅผ ํ™•์ธํ•˜์„ธ์š”.

  • Install npm-check-updates with npm i npm-check-updates -g
  • Run npm-check-updates to list what packages are out of date (basically the same thing as running npm outdated)
  • Run npm-check-updates -u to update all the versions in your package.json (this is the magic sauce)
  • Run npm update as usual to install the new versions of your packages based on the updated package.json

 

 

์ถœ์ฒ˜ : node.js - npm check and update package if needed - Stack Overflow

 

npm check and update package if needed

We need to integrate Karma test runner into TeamCity and for that I'd like to give sys-engineers small script (powershell or whatever) that would: pick up desired version number from some config f...

stackoverflow.com

 

 

728x90
'Server/Node.js' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€
  • Yarn ์ด๋ž€?
  • yarn ๋ช…๋ น์–ด๊ฐ€ ์œˆ๋„์šฐ์—์„œ ์•ˆ๋ ๋•Œ
  • Next.js ์„ค์น˜ ๋ฐฉ๋ฒ•
  • Node.js - Introduction
์ง€๋‹ˆ๐Ÿงž‍โ™‚๏ธ๐Ÿฅญ
์ง€๋‹ˆ๐Ÿงž‍โ™‚๏ธ๐Ÿฅญ
์ผ์ƒ, ๊ฒŒ์ž„, ๋ง›์ง‘, ์—ฌํ–‰, ๊ฐœ๋ฐœ, IT ๋ธ”๋กœ๊ทธ๐Ÿงž
  • ์ง€๋‹ˆ๐Ÿงž‍โ™‚๏ธ๐Ÿฅญ
    ์š”์ˆ  ๋žจํ”„๐Ÿซ–
    ์ง€๋‹ˆ๐Ÿงž‍โ™‚๏ธ๐Ÿฅญ
  • ์ „์ฒด
    ์˜ค๋Š˜
    ์–ด์ œ
    • All (549)
      • Languages (57)
        • JAVA (13)
        • JSP (1)
        • C_C++ (4)
        • Html (3)
        • CSS (1)
        • JavaScript (18)
        • Python (3)
        • Kotlin (13)
        • TypeScript (1)
      • Framework (14)
        • spring (11)
        • jstl (1)
        • angular (2)
      • Tool (28)
        • Eclipse (5)
        • vsCode (3)
        • scrcpy (2)
        • Git (1)
        • IntelliJ (6)
        • Visual-studio (1)
        • UML (1)
        • Gradle (8)
      • DB (6)
        • Oracle (1)
        • MySql (3)
        • Mongo (2)
      • OS (14)
        • Linux (2)
        • Windows (12)
      • Server (8)
        • Tomcat (1)
        • Apache (1)
        • Node.js (6)
      • Programmings (25)
        • Design Pattern (2)
        • Funny (20)
        • Algorithms (3)
      • Cloud (8)
        • Docker (1)
        • Kubernetes (4)
        • Istio (1)
        • ArgoCD (2)
      • IT (5)
        • gRPC (3)
        • RESTful (3)
        • Web UI (5)
        • AI (4)
      • Book (6)
      • TIP (187)
      • Life (53)
      • Game (83)
      • Storage (22)
      • ์‹๋‹น (15)
  • ๋ธ”๋กœ๊ทธ ๋ฉ”๋‰ด

    • ํ™ˆ
    • ํƒœ๊ทธ
    • ๋ฐฉ๋ช…๋ก
    • ์‚ฌ์ดํŠธ๋งต
    • RSS
    • ๊ธฐํƒ€ ์†Œ๋“
  • ๋งํฌ

    • ๊ตฌ๊ธ€
    • ๋„ค์ด๋ฒ„
    • ์ •๋ถ€24
    • Spring Framework ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ
    • Kotlin ๋ฆด๋ฆฌ์ฆˆ ๋…ธํŠธ
    • ์นด์นด์˜ค ์• ๋“œํ•
    • ๋ธ”๋กœ๊ทธ ์‚ฌ์ดํŠธ๋งต
    • ๋ธ”๋กœ๊ทธ RSS
  • ๊ณต์ง€์‚ฌํ•ญ

    • ์•ˆ๋…•ํ•˜์„ธ์š”
  • ์ธ๊ธฐ ๊ธ€

  • ํƒœ๊ทธ

    ๋ธŒ๋ฆฌํ•‘
    ๋ชฌ์Šคํ„ฐํ—Œํ„ฐ์™€์ผ์ฆˆ
    ํ•œ๋ˆˆ์— ๋ณด๋Š” ์˜ค๋Š˜์˜ ๋‰ด์Šค
    ๋ชฌ์Šคํ„ฐํ—Œํ„ฐ๋‚˜์šฐ
    ํƒœ๊ตญ
    ์˜ค๋Š˜์˜๋‰ด์Šค
    ๋ฐ์ผ๋ฆฌ ๋‰ด์Šค
    ๋‰ด์Šค ๋ธŒ๋ฆฌํ•‘
    ๋‰ด์Šค
    ํ€˜์ŠคํŠธ
  • ์ตœ๊ทผ ๋Œ“๊ธ€

  • ์ตœ๊ทผ ๊ธ€

  • hELLOยท Designed By์ •์ƒ์šฐ.v4.10.3
์ง€๋‹ˆ๐Ÿงž‍โ™‚๏ธ๐Ÿฅญ
[NPM] package ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ ๋ฐฉ๋ฒ•
์ƒ๋‹จ์œผ๋กœ

ํ‹ฐ์Šคํ† ๋ฆฌํˆด๋ฐ”