易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 163|回复: 1
收起左侧

将npm和cnpm组件升级到最新版本

[复制链接]
发表于 2025-7-29 10:22:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
将npm和cnpm组件升级到最新版本
. s& m* ^1 c5 i8 l- vPS C:\Users\admin\projects> npm i cnpm@latest
1 l8 p: ^% `) ~" E1 @3 u
6 N. k2 x* Z$ K) {added 1 package in 1m
, q5 w' J* ~7 U4 R) }: W3 z( X9 K( I$ J- e0 l
55 packages are looking for funding
2 W, ~: t* s0 b  run `npm fund` for details
6 Q) c( O' V& w$ l
; u9 j: j5 C0 ~8 ?. g! ?PS C:\Users\admin\projects> cnpm i -g npm@latest
1 y- X0 m+ E7 Z0 [- y5 v( `+ MDownloading npm to C:\Users\admin\AppData\Roaming\npm\node_modules\npm_tmp
+ C' x3 @6 p4 V) i( T0 r; }: yCopying C:\Users\admin\AppData\Roaming\npm\node_modules\npm_tmp\.store\npm@11.5.1\node_modules\npm to C:\Users\admin\AppData\Roaming\npm\node_modules\npm
( B5 y0 S, \+ h# N2 Z* w3 A2 B0 GInstalling npm's dependencies to C:\Users\admin\AppData\Roaming\npm\node_modules\npm/node_modules8 r" g! b$ {& k& ^4 u
[1/66] Package @isaacs/string-locale-compare@^1.1.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@isaacs\string-locale-compare# r+ [: S- T& w. O
[2/66] Package @npmcli/arborist@^9.1.3 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist# n8 R% j$ L4 ~+ _' I
[3/66] Package @npmcli/config@^10.3.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\config
8 f# f! P4 S! o" L: {" `[4/66] Package @npmcli/fs@^4.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\fs
) ~4 ^7 ~0 `  n% Y! D0 w2 N[5/66] Package @npmcli/map-workspaces@^4.0.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\map-workspaces
# _. c5 C1 y. D( u$ l( o& D8 m[6/66] Package @npmcli/package-json@^6.2.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\package-json     
9 u  i/ o% ]! ~6 }[7/66] Package @npmcli/promise-spawn@^8.0.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\promise-spawn   $ _/ D! K1 y& R! {0 H& u6 j6 V. \
[8/66] Package @npmcli/run-script@^9.1.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\run-script
) P) ]3 `- r! U8 A[9/66] Package @npmcli/redact@^3.2.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\redact
% l+ v! Q- P# \- q[10/66] Package @sigstore/tuf@^3.1.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\@sigstore\tuf
  Q( }. K( [1 c* m4 {8 K# \[11/66] Package abbrev@^3.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\abbrev% R, {3 b' W- E' w8 ~0 x$ [) W/ Y
[12/66] Package archy@~1.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\archy: S0 s5 w' k# l' d/ P
[13/66] Package cacache@^19.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\cacache
) Z7 l( }/ l( |[14/66] Package chalk@^5.4.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\chalk( S* m# E" |, e9 {- l8 E" ~  B- ]& b
[15/66] Package ci-info@^4.3.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\ci-info
. ^' f. i5 C" z2 K. ^* N6 {[16/66] Package cli-columns@^4.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\cli-columns! e+ \4 R1 }" L4 @9 W
[17/66] Package fs-minipass@^3.0.3 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\fs-minipass5 H/ }6 U" a9 t. f/ s6 _
[18/66] Package fastest-levenshtein@^1.0.16 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\fastest-levenshtein     
0 r% w) F6 O  u# J* a[19/66] Package glob@^10.4.5 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\glob
; Y& l  z8 Q- I3 T/ S[20/66] Package graceful-fs@^4.2.11 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs. S# x! |& H" y/ ?8 h$ `
[21/66] Package hosted-git-info@^8.1.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\hosted-git-info
& m9 O/ X  N! e0 D[22/66] Package init-package-json@^8.2.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\init-package-json  N" u. x$ Q# M# s6 }$ Y0 F
[23/66] Package ini@^5.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\ini0 d! ]) {. _7 h( L: N5 X
[24/66] Package is-cidr@^5.1.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\is-cidr
: J3 |8 t' f3 h[25/66] Package json-parse-even-better-errors@^4.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\json-parse-even-better-errors
+ s' e: `8 o5 s7 E4 K: r; o9 s8 d[26/66] Package libnpmaccess@^10.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmaccess
3 k9 a$ l$ i) {* L, n4 G  N[27/66] Package libnpmdiff@^8.0.6 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmdiff
6 Q4 l  X" f6 B1 R1 E/ Z9 Q/ X[28/66] Package libnpmexec@^10.1.5 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmexec
/ x: q% Q' d0 p; s$ G( `- R9 g[29/66] Package libnpmfund@^7.0.6 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmfund
2 d' r  @! d& x* j& {* U, S1 e[30/66] Package libnpmorg@^8.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmorg' @8 O$ j2 W" l. y: ]( `' j6 @4 s7 E
[31/66] Package libnpmpack@^9.0.6 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmpack
! E, i9 j4 j9 k% P+ z; r[32/66] Package libnpmpublish@^11.1.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmpublish4 t& S; z  j6 j- g& O8 C# l
[33/66] Package libnpmsearch@^9.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmsearch; ?- ^& y6 {3 R1 s3 m* W& h2 y( c
[34/66] Package libnpmteam@^8.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmteam5 h2 n% @" c2 k/ y
[35/66] Package libnpmversion@^8.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\libnpmversion
  N; Z" a1 M& S) p: n3 r; m[36/66] Package make-fetch-happen@^14.0.3 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\make-fetch-happen8 C  I, b/ I- U) t) d/ w
[37/66] Package minimatch@^9.0.5 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\minimatch
0 E' l$ u" F; J8 M  c2 e! R+ Z[38/66] Package minipass@^7.1.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\minipass
8 [5 b6 @& R& ~( {, E[39/66] Package minipass-pipeline@^1.2.4 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-pipeline
% z( H( C& R' e2 f[40/66] Package ms@^2.1.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\ms% j% d8 a. T1 i2 M6 D
[41/66] Package node-gyp@^11.2.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp# d% x3 L0 C2 h
[42/66] Package nopt@^8.1.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\nopt
. @2 N! L4 ?* h& t[43/66] Package normalize-package-data@^7.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\normalize-package-data[44/66] Package npm-audit-report@^6.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-audit-report
1 v5 f( O" Z. N8 i2 P& {$ L& b[45/66] Package npm-install-checks@^7.1.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-install-checks% T* r+ r: a. d, {/ f
[46/66] Package npm-package-arg@^12.0.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-package-arg
4 E) V0 d6 b/ ]5 H[47/66] Package npm-pick-manifest@^10.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-pick-manifest
6 g: O6 {7 r! b( a[48/66] Package npm-profile@^11.0.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-profile. _" R3 U. v" o" e3 {. |0 K
[49/66] Package npm-registry-fetch@^18.0.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-registry-fetch       5 P3 o- f; m  Z
[50/66] Package npm-user-validate@^3.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\npm-user-validate$ V+ i5 U- v/ ^- Y* \* D$ s
[51/66] Package p-map@^7.0.3 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\p-map6 t( z4 K8 s" ?) I9 U  n* T& {1 n
[52/66] Package pacote@^21.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\pacote
4 }  f, ?$ J& [+ z9 f- D[53/66] Package parse-conflict-json@^4.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\parse-conflict-json      
' o% _' z* M9 R5 G! p[54/66] Package proc-log@^5.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\proc-log
  A3 X/ M  T' W3 [$ f[55/66] Package qrcode-terminal@^0.12.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\qrcode-terminal
3 E6 y6 V) J4 _2 `[56/66] Package read@^4.1.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\read
) V2 _3 r( B' v1 [) Q/ p) V3 f& j[57/66] Package semver@^7.7.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\semver' @6 ~' `3 {+ B$ M0 c  _" O3 Z
[58/66] Package spdx-expression-parse@^4.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\spdx-expression-parse  8 u  Z4 m/ D( p+ B$ R9 n9 r& ?5 b" T
[59/66] Package ssri@^12.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\ssri
  K) B! h$ W) C8 V[61/66] Package tar@^6.2.1 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\tar; V; }) E' e6 d5 R
[63/66] Package tiny-relative-date@^1.3.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\tiny-relative-date        8 U/ G6 k3 _. h6 \  t) `
[64/66] Package treeverse@^3.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\treeverse
! O* ?/ S) @* J& F: B, ~" o[65/66] Package validate-npm-package-name@^6.0.2 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\validate-npm-package-name
  l) W- ?3 y- h6 q7 \- s- p[66/66] Package which@^5.0.0 is skipped because it already exists at: C:\Users\admin\AppData\Roaming\npm\node_modules\npm\node_modules\which& S- X* y7 `4 S( X1 J
[npm@11.5.1] link C:\Users\admin\AppData\Roaming\npm\npm@ -> C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
8 R2 V. U$ ?9 A8 |[npm@11.5.1] link C:\Users\admin\AppData\Roaming\npm\npx@ -> C:\Users\admin\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
1 e! Y. ?3 `+ G& X
# n+ l0 }& j9 A# s' VPS C:\Users\admin\projects> npm -v3 l" k1 L" t: M7 x4 x
11.5.1
- N: S9 D7 h& z1 f. T5 FPS C:\Users\admin\projects> npm i cnpm@latest
  H. M; @" W' l. a5 h9 F! r% y2 _$ d
0 B4 C  D' y2 o/ v, yadded 1 package in 1m' F' {2 \$ w; ^- I" `1 a& ?! D/ {
7 I' n' q  Z; w9 ]3 _7 \: D" p; c
55 packages are looking for funding4 u+ N) i! `: [5 o
  run `npm fund` for details
) F: c# l: i. HPS C:\Users\admin\projects> cnpm -v% N4 o: f% o; W; [* Y" u, A
cnpm@9.4.0 (C:\Users\admin\AppData\Roaming\npm\node_modules\cnpm\lib\parse_argv.js)% N. `( P9 ^& @. Q, n9 E! g( Z
npm@9.9.2 (C:\Users\admin\AppData\Roaming\npm\node_modules\cnpm\node_modules\npm\index.js)
6 {1 B# p9 }" c; S- inode@24.4.1 (C:\Program Files\nodejs\node.exe)
0 y/ I5 r1 O; }  [6 Unpminstall@7.12.0 (C:\Users\admin\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\lib\index.js)
+ d# T5 X, B0 N; [8 C; mprefix=C:\Program Files\nodejs: i4 m( @- q  X8 g; c' y4 r
win32 x64 10.0.19045
, v; j1 _& F# U4 j/ _registry=https://registry.npmmirror.com4 t  {9 Q. B# n  M. I
PS C:\Users\admin\projects>
3 P# I7 t5 u, @4 u3 F
- e5 h8 f, |$ M; l
 楼主| 发表于 2025-7-29 10:22:55 | 显示全部楼层
#升级 npm
8 b: c+ ~. Y3 T' J$ p# X- Ocnpm install npm -g/ T$ x- d* H! E
( w' B7 f' R! G8 Y2 x( D

. V6 L. Y8 i2 M# Y# 升级或安装 cnpm% u( s" I0 _$ H; ~
npm install cnpm -g
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 23:38 , Processed in 0.046129 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表