当前位置: 首页>后端>正文

还在用nvm做node管理工具?快来试试Volta吧!

杩樺湪鐢╪vm鍋歯ode绠$悊宸ュ叿锛熷揩鏉ヨ瘯璇昖olta鍚э紒

涓轰粈涔堜細鐢╒olta鍛紵 鍥犱负杩欐鏃堕棿鐢佃剳涓婄殑yarn鍑轰簡闂锛?strong>yarn install涔嬪悗灏辨姤閿?code>There appears to be trouble with your network connection. Retrying...锛屾湡闂存壘浜嗗緢澶氭柟娉曢兘娌℃湁瑙e喅锛屼絾鏄粖澶╃敤Volta瀹夎浜唝arn涔嬪悗灞呯劧濂囪抗鑸殑鍙互涓嬭浇浜嗭紝閫熷害杩樼壒鍒揩銆傝櫧鐒跺彲浠ヤ簡锛屼絾渚濈劧涓嶇煡閬撲粈涔堝師鍥犲鑷寸殑銆備笉杩囧張鍙互鐢▂arn浜嗭紝寮€蹇凁煒剘~

馃イ浠€涔堟槸Volta

鏍囬璇?Node.js 鐗堟湰鎺у埗锛屼絾浣犱篃鍙互鍋?npm/yarn 鐗堟湰鎺у埗銆傚湪瀹樻柟缃戠珯涓婏紝瀹冭浠嬬粛涓衡€滄棤蹇ф棤铏戠殑 JavaScript 宸ュ叿绠$悊鍣ㄢ€濄€傚綋鎴戞妸椤圭洰鐨?Node.js 鐨勭増鏈帶鍒剁粺涓€鍒?Volta 鐨勬椂鍊欙紝DX 涓婂幓浜嗗緢澶氾紝鎴戞劅鍙楀埌浜?Volta 鐨勫ソ澶勩€?/p>

鐩墠娌℃湁璇︾粏瑙i噴鐨勪腑鏂囪祫婧愶紝鎵€浠ユ垜闃呰浜嗗畼鏂规枃妗e苟閰屾儏灏嗗叾缈昏瘧鎴愪腑鏂囥€? 甯屾湜鏈夊ぇ浣彲浠ユ棤鐥涢槄璇诲苟浠嬬粛Volta銆?/p>

馃イVolta姒傝堪

鎴戜滑鏉ョ湅鐪嬪畼缃戜粙缁嶇殑涓変釜鍔熻兘銆?/p>

Get Started 鈫?/p>

鈿?Fast锝?蹇?/h5>

Install and run any JS tool quickly and seamlessly! Volta is built in Rust and ships as a snappy static binary.

蹇€熸棤缂濆湴瀹夎鍜岃繍琛屼换浣?JS 宸ュ叿锛乂olta 鍐呯疆浜?Rust 骞朵綔涓轰竴涓椿娉肩殑闈欐€佷簩杩涘埗鏂囦欢鎻愪緵銆?/p>

Volta 鏄敱 Rust 鍒朵綔鐨勶紝鍥犳瀹冩瘮鍏朵粬鐗堟湰鎺у埗宸ュ叿杩愯寰楁洿蹇€?*** 蹇偣寰堝ソ銆?**

鈿?Reliable锝?绋冲浐锝滃彲闈?/h5>

Ensure everyone in your project has the same tools鈥攚ithout interfering with their workflow.

纭繚椤圭洰涓殑姣忎釜浜洪兘鎷ユ湁鐩稿悓鐨勫伐鍏凤紝鑰屼笉浼氬共鎵颁粬浠殑宸ヤ綔娴佺▼ 銆?/p>

杩欐槸鎴戣寰楁渶鍙楃泭鐨勫湴鏂广€? volta pin鎮ㄥ彲浠ヤ娇鐢ㄨ鍛戒护杞绘澗瀵归綈椤圭洰鎴愬憳鐨?Node.js 鍜?npm 鐗堟湰銆?/p>

鎴戝皢鍦ㄦ枃绔犲悗闈㈣缁嗚В閲婂浣曚娇鐢ㄥ畠锛屾墍浠ユ垜鍏堟斁鐫€瀹冦€?/p>

鈿?Universal锝?涓囪兘

No matter the package manager, Node runtime, or OS, one command is all you need: volta install.

鏃犺鏄寘绠$悊鍣ㄣ€丯ode 杩愯鏃惰繕鏄搷浣滅郴缁燂紝鎮ㄥ彧闇€瑕佷竴涓懡浠わ細volta install.

Windows/Mac/Linux銆傞€傜敤浜庝换浣曟搷浣滅郴缁熴€?/p>

闄ら潪姣忎釜浜洪兘鍦ㄤ娇鐢?Volta锛屽惁鍒欏畠鏃犳硶宸ヤ綔锛屽洜姝ゅ畠鍙互鍦ㄤ换浣曟搷浣滅郴缁熶笂杩愯寰堥噸瑕併€?/p>

馃敂鐗圭偣

璁╂垜浠揩閫熸祻瑙堜竴涓嬭繖浜涘姛鑳姐€?/p>

  • 閫熷害鈿★笍

  • 閫愪釜椤圭洰鐨勬棤缂濈増鏈垏鎹?/p>

  • 璺ㄥ钩鍙版敮鎸侊紝鍖呮嫭 Windows 鍜屾墍鏈?Unix shell

  • 鏀寔澶氫釜鍖呯鐞嗗櫒

  • 宸ュ叿瀹夎绋冲畾锛堟瘡娆¤妭鐐瑰崌绾у悗鏃犻渶閲嶆柊瀹夎锛?/p>

  • 鐢ㄤ簬鐗瑰畾浜庣珯鐐圭殑鑷畾涔夌殑鍙墿灞曟€ф寕閽?/p>

鉂o笍涓轰粈涔堣浣跨敤 Volta锛燂綔 涓轰粈涔堥€夋嫨Volta锛?/h2>

浣跨敤 Volta锛屼竴鏃︽偍閫夋嫨浜?Node 寮曟搸锛屾偍灏变笉蹇呮媴蹇冨畠銆傚垏鎹㈤」鐩笉闇€瑕佹偍鎵嬪姩鍒囨崲鐗堟湰銆傛偍鍙互鍦ㄥ伐鍏烽摼涓畨瑁?npm 杞欢鍖呬簩杩涘埗鏂囦欢锛岃€屾棤闇€瀹氭湡閲嶆柊瀹夎瀹冧滑鎴栨壘鍑哄畠浠仠姝㈠伐浣滅殑鍘熷洜銆?/p>

蹇€熻缃拰鍒囨崲 Node 寮曟搸

鎮ㄥ彲浠ヨ幏鍙栧拰浣跨敤鐗瑰畾鐗堟湰鐨勮妭鐐广€?/p>

缁堢


$ volta install node@14

鎮ㄤ細绔嬪嵆娉ㄦ剰鍒拌宸ュ叿鐨勫搷搴旇兘鍔涖€傛偍鐨勫紑鍙戞椂闂村緢瀹濊吹锛丣avaScript 寮€鍙戜汉鍛樺簲璇ュ緱鍒颁竴涓揩閫熺殑宸ュ叿銆傪煓?/p>

褰撶劧鎴戣寰楀畨瑁呭緢蹇€?/p>

鍗忎綔鑰呯殑鍙鍒剁幆澧?/h3>

Volta 鍏佽鎮ㄤ娇鐢ㄥ崟涓懡浠ら€夋嫨椤圭洰鐨勮妭鐐瑰紩鎿庡拰鍖呯鐞嗗櫒銆?/p>


~~璺緞/鍒?浣犵殑/椤圭洰~~

$ volta pin node@12

Volta 灏?Node 寮曟搸鐨勭‘鍒囩増鏈瓨鍌ㄥ湪 package.json 涓紝鍥犳鎮ㄥ彲浠ュ皢鎮ㄧ殑閫夋嫨鎻愪氦缁?git銆備粠閭f椂璧凤紝姣忔鎮ㄥ湪椤圭洰鐩綍涓繍琛?Node 鏃讹紝Volta 閮戒細鑷姩鍒囨崲鍒颁笌鎮ㄩ€夋嫨鐩稿悓鐗堟湰鐨?Node 銆傚悓鏍凤紝鎮ㄧ殑鍚堜綔鑰呬篃鍙互閫氳繃鍦ㄤ粬浠悇鑷殑寮€鍙戞満鍣ㄤ笂瀹夎 Volta 鏉ュ仛鍚屾牱鐨勪簨鎯呫€?/p>

杩欏氨鏄疺olta鐨勫叏閮ㄦ剰涔夋墍鍦ㄣ€傝繖鏄瘡涓汉閮藉湪浣跨敤Volta鐨勬潯浠讹紝浣嗘槸鍒涘缓鐜鐨勪汉鍙互volta pin閫氳繃鍛戒护淇鐗堟湰锛屽叾浠栨垚鍛樺彲浠ヤ笉鍋囨€濈储鍦版墽琛屽畠npm install銆? 鑳界渷鍘绘鏌ョ増鏈殑楹荤儲銆?/p>

馃槒閲嶆柊瀹夎锛?/h3>

Volta 鍏佽鎮ㄥ皢鍠滄鐨勮蒋浠跺寘浜岃繘鍒舵枃浠跺畨瑁呬负鍛戒护琛屽伐鍏凤紝鑰屼笉蹇呮媴蹇冧細鐮村潖鎮ㄧ殑寮€鍙戦」鐩€傛洿濂界殑鏄紝杩欎簺宸ュ叿鍦ㄥ畨瑁呮湡闂村浐瀹氬埌鐗瑰畾鐨?Node 寮曟搸锛岄櫎闈炴偍鏄庣‘鎸囩ず瀹冧滑锛屽惁鍒欎笉浼氭洿鏀广€?/p>


$ npm install -g surge

$ surge -h

鍗充娇浣跨敤姝ゅ叏灞€瀹夎锛屼篃浼氫负姣忎釜椤圭洰璁颁綇鐗堟湰锛屽洜姝ゆ偍涓嶅繀鎷呭績鐗堟湰銆?/p>

馃洜锔忓畨瑁?Volta | 鍏ラ棬

鐜板湪璁╂垜浠畨瑁?Volta銆?/p>

瀹夎鍓嶆渶濂芥妸褰撳墠浣跨敤鐨凬ode鐗堟湰鎺у埗宸ュ叿鍘绘帀锛屼絾涔熷苟闈炲繀椤荤殑銆?/p>

宸ュ叿鐨勫垹闄ら儴鍒嗭紙nodebrew, NVM, nodist, ...锛夌殑妯″紡澶浜嗭紝鎵€浠ユ垜灏辩渷鐣ュ垹闄ゆ柟娉曚簡銆傝鏍规嵁鑷繁鐨勭幆澧冩鏌ワ紒

濡傛灉鎸夌収浜唍odebrew锛屽彲浠ラ€氳繃鍙傝€冭繖绡囨枃绔犲皢鍏跺垹闄ゃ€?/p>

瀹夎Volta

鎸夌収瀹樻柟鍏ラ棬瀹夎銆?/p>

濡傛灉鎿嶄綔绯荤粺鏄?Mac / Linux锛堝寘鎷?WSL锛夛紝鎮ㄥ彲浠ヤ娇鐢ㄤ互涓嬪懡浠よ交鏉惧畨瑁呭畠銆?/p>


$ curl https://get.volta.sh | bash

鍛戒护鏄?code>| bash锛屼絾鍗充娇鏄偅浜涗娇鐢?zsh /fish 鐨勪汉涔熷彲浠ユ鏃犻棶棰樺湴瀹夎瀹冦€傝鎴戜滑鐓у師鏍峰仛鍚э紒

鎴戝緢鎰熸縺閫氳璇佷細鑷姩閫氳繃銆?/p>

瀵逛簬 Windows锛屽彲浠ヤ娇鐢?Windows 瀹夎绋嬪簭锛屼竴璺痭ext鍗冲彲

鈿狅笍瀵逛簬 Windows锛屼娇鐢?Volta 浼间箮闇€瑕佷竴浜涜缃紝鍥犳璇锋寜鐓у畼缃戠殑璇存槑杩涜璁剧疆銆傦紝浣嗘槸鎴戞病鏈夎缃緷鏃у彲浠ヤ娇鐢?/del>锛屽彲浠ョ悊瑙d负寮€绠卞嵆鐢ㄣ€?/p>

纭宸插畨瑁?/h2>

.zshrc鏌ョ湅shell閰嶇疆鏂囦欢濡傚甫鏈?code>cat鍛戒护鐨勬枃浠剁瓑锛屽鏋滃啓鍏ュ涓嬭矾寰勶紝灏監K浜嗐€?/p>

~/.zshrc


export VOLTA_HOME="$HOME/.volta"

export PATH="$VOLTA_HOME/bin:$PATH"

閲嶆柊鍚姩缁堢涓€娆?code>volta锛屾鏌ユ槸鍚﹀彲浠ヤ娇鐢ㄨ鍛戒护銆?/p>


$ volta --version

  • 馃憡馃徑鏄剧ずVolta鐗堟湰鏃跺畨瑁呭畬鎴愶紒

鉁斾簡瑙?Volta

Volta 鐨勫伐浣滄槸node绠$悊JavaScript 鍛戒护琛屽伐鍏凤紝渚嬪浣滀负 JavaScript 鍖呯殑涓€閮ㄥ垎鎻愪緵鐨勫彲鎵ц鏂囦欢npm銆?涓庡寘绠$悊鍣ㄤ竴鏍凤紝Volta 浼氭牴鎹偍褰撳墠鐨勭洰褰曡窡韪偍姝e湪澶勭悊鐨勯」鐩€俈olta 宸ュ叿閾句腑鐨勫伐鍏蜂細鑷姩妫€娴嬫偍鍦ㄤ娇鐢ㄧ壒瀹氱増鏈伐鍏风殑椤圭洰涓紝骞跺皢鎮ㄥ紩瀵煎埌鏈€閫傚悎鎮ㄧ殑宸ュ叿鐗堟湰銆?code>yarn

绠$悊浣犵殑宸ュ叿閾?/h2>

Volta 宸ュ叿閾剧鐞嗙殑宸ュ叿鐢?code>volta install涓や釜volta uninstall鍛戒护鎺у埗

Node瀹夎

鍦ㄥ伐鍏烽摼涓畨瑁呭伐鍏锋椂锛屽畨瑁呯殑鐗堟湰鏄宸ュ叿鐨?em>榛樿鐗堟湰銆傞櫎闈炴偍鍦ㄤ竴涓」鐩洰褰曚腑宸ヤ綔锛屽叾涓偍鏈変竴涓浐瀹氱増鏈殑 Node 浠ヤ娇鐢ㄤ笉鍚岀殑鐗堟湰锛屽惁鍒欏畠榛樿涓?Volta 浣跨敤鐨勭増鏈€?/p>

渚嬪锛屾偍鍙互閫氳繃瀹夎鐗瑰畾鐗堟湰鏉ラ€夋嫨 Node 鐨勯粯璁ょ増鏈€?/p>


$ volta install node@14.15.5

濡傛灉鎮ㄦ病鏈夋寚瀹氱‘鍒囩殑鐗堟湰锛孷olta 浼氶€夋嫨涓庢偍鐨勮姹傜浉鍖归厤鐨勯€傚綋鐗堟湰銆?/p>


$ volta install node@14

latest鎮ㄤ篃鍙互瀹夎鏈€鏂扮増鏈€傛澶栵紝濡傛灉鎮ㄥ畬鍏ㄧ渷鐣ョ増鏈紝Volta 灏嗛€夋嫨骞跺畨瑁呮渶鏂扮殑 LTS 鐗堟湰銆?/p>


$ volta install node@latest

# Node@LTS

$ volta install node

褰撴偍杩愯浠讳綍杩欎簺鍛戒护鏃讹紝鐢?Volta 鍦?PATH 鐜锛堟垨 Windows 涓婄殑 Path锛変腑鎻愪緵鐨勮妭鐐瑰彲鎵ц鏂囦欢榛樿鑷姩杩愯鎵€閫夌増鏈殑鑺傜偣銆?/p>

鍚屾牱锛屾偍鍙互浣跨敤volta install npm鍜?code>volta install yarn鍒嗗埆閫夋嫨 npm 鍜?Yarn 鍖呯鐞嗗櫒鐨勭増鏈€傝繖浜涘伐鍏蜂娇鐢ㄦ墍閫夎妭鐐圭殑榛樿鐗堟湰杩愯銆?/p>

鑺傜偣寮曟搸鍥哄畾

volta pin鎮ㄥ彲浠ヤ娇鐢ㄥ懡浠ゆ潵閫夋嫨椤圭洰鐨?Node 寮曟搸鍜屽寘绠$悊鍣ㄧ殑鐗堟湰銆?/p>


$ volta pin node@14.17

$ volta pin npm@6.14

灏哣olta淇濆瓨鍒癭package. JSON:


"volta":  { 

"node":  "14.17.3", 

"npm":  "6.14.13" 

}

杩欐牱锛屼娇鐢?Volta 杩涜椤圭洰寮€鍙戠殑姣忎釜浜洪兘灏嗚嚜鍔ㄨ幏寰椾笌json璁剧疆鐨勭浉鍚岀増鏈€?/p>

浣跨敤椤圭洰宸ュ叿

node鍜屽寘绠$悊鍣ㄥ彲鎵ц鏂囦欢涓嶆槸宸ュ叿閾句腑鍞竴鐨勬櫤鑳藉伐鍏枫€傚伐鍏烽摼涓殑鍖呬簩杩涘埗鏂囦欢涔熷彲浠ヨ瘑鍒綋鍓嶇洰褰曞苟灏婇噸褰撳墠椤圭洰缁撴瀯銆?/p>

渚嬪锛屽畨瑁?Typescript 鍖呬細灏嗙紪璇戝櫒鍙墽琛屾枃浠?( tsc) 娣诲姞鍒板伐鍏烽摼涓€?/p>


$ npm install --global typescript

鏍规嵁鎮ㄥ弬涓庣殑椤圭洰锛屾鍙墽琛屾枃浠跺皢鍒囨崲鍒版偍椤圭洰涓€夋嫨鐨?TypeScript 鐗堟湰銆?/p>


cd /path/to/project-using-typescript-3.9.4

tsc --version # 3.9.4

cd /path/to/project-using-typescript-4.1.5

tsc --version # 4.1.5

濡傛偍鎵€瑙侊紝涓嶄粎 Node 鍜?npm / Yarn 绛夊寘绠$悊鍣紝鑰屼笖閫氳繃瀹冧滑瀹夎鐨勫寘浜岃繘鍒舵枃浠堕兘鍙楀埌 Volta 鐨勭洃鎺с€傚洜姝わ紝瀹冧細鑷姩鍒囨崲姣忎釜椤圭洰鐨勭増鏈€?/p>

瀹夊叏渚垮埄

Volta 鐨勫伐鍏烽摼浼氳窡韪偍鐨勪綅缃€傚洜姝わ紝鎮ㄤ娇鐢ㄧ殑宸ュ叿灏嗗缁堜紭鍏堣€冭檻鎮ㄦ鍦ㄥ鐞嗙殑椤圭洰鐨勮缃€傝繖鎰忓懗鐫€鎮ㄥ湪鍒囨崲椤圭洰鏃朵笉蹇呮媴蹇冩洿鏀瑰凡瀹夎杞欢鐨勭姸鎬併€?/p>

姝ゅ锛屾瘡娆¤繍琛屽伐鍏锋椂锛孷olta 閮戒細瑕嗙洊璺熻釜锛屼娇 npm 鎴?Yarn 鑴氭湰姘歌繙涓嶄細鐭ラ亾宸ュ叿閾剧殑鍐呭銆?/p>

缁撳悎杩欎袱涓壒鎬э紝Volta 瑙e喅浜嗗叏灞€灏佽鐨勯棶棰樸€傛崲鍙ヨ瘽璇达紝Volta 鎻愪緵浜嗗叏灞€鍖呭畨瑁呯殑渚垮埄锛屼絾娌℃湁鍗遍櫓銆?/p>

渚嬪锛?code>npm i -g typescript鎮ㄥ彲浠ュ畨鍏ㄥ湴瀹夎 TypeScript锛?code>tsc骞朵韩鍙楃洿鎺ヤ粠鎺у埗鍙拌皟鐢ㄥ畠鐨勪究鍒┿€?/p>

馃挕Volta 鍛戒护

volta鍛戒护琛屼簩杩涘埗鍙傝€冨涓嬨€傦紙鐐规鏌ョ湅瀹樻柟鍛戒护鍙傝€冿級


The JavaScript Launcher 鈿?

    To install a tool in your toolchain, use `volta install`.

    To pin your project's runtime or package manager, use `volta pin`.

USAGE:

    volta [FLAGS] [SUBCOMMAND]

FLAGS:

        --verbose   

            Enables verbose diagnostics

        --quiet     

            Prevents unnecessary output

    -v, --version   

            Prints the current version of Volta

    -h, --help     

            Prints help information

SUBCOMMANDS:

    fetch          Fetches a tool to the local machine

    install        Installs a tool in your toolchain

    uninstall      Uninstalls a tool from your toolchain

    pin            Pins your project's runtime or package manager

    list          Displays the current toolchain

    completions    Generates Volta completions

    which          Locates the actual binary that will be called by Volta

    setup          Enables Volta for the current user/shell

    help          Prints this message or the help of the given subcommand(s)

Volta甯哥敤鍛戒护浠嬬粛

鏈€鍚庯紝鎴戞兂浠嬬粛涓€浜涘父鐢ㄧ殑鍛戒护銆?/p>

volta install

volta install璁剧疆宸ュ叿鐨勯粯璁ょ増鏈€傚鏋滄湭缂撳瓨鏈湴鎸囧畾鐨勭増鏈紝璇蜂粠璇ュ伐鍏蜂腑鑾峰彇瀹冦€?/p>

濡備綍浣跨敤volta install [FLAGS] <tool[@version]>銆?/p>

涓婇潰璇存槑浜嗗畨瑁呮椂鎸囧畾鐗堟湰鐨勬柟娉曪紝浣嗘€荤粨濡備笅銆?/p>


# 瀹夎鎸囧畾鐗堟湰鐨刵ode

$ volta install node@14.17.3 

# 瀹夎鐗瑰畾鐗堟湰涓殑绋冲畾鐨刵ode鐗堟湰

$ volta install node@14 

# 瀹夎LTS鐗堟湰鐨刵ode

$ volta install  node 

# 瀹夎鏈€鏂扮増鏈殑node

$ volta install node@latest

volta pin

volta pin``package.json璇ュ懡浠ゆ洿鏂伴」鐩枃浠朵互浣跨敤鎵€閫夌増鏈殑宸ュ叿銆?/p>

姝ゅ懡浠ゅ彧鑳界敤浜庤妭鐐瑰拰鍖呯鐞嗗櫒锛坣pm / Yarn锛夈€?/p>

浣跨敤鏂规硶鏄?code>volta pin [FLAGS] <tool[@version]>銆?/p>


# node鐗堟湰鍥哄畾

$ volta pin node@14.17

# npm鐗堟湰鍥哄畾

$ volta pin npm@6.14

# or volta pin yarn@1.19

鍦ㄩ」鐩洰褰曚腑鎵ц涓婅堪volta pin鍛戒护鏃讹紝package.json灏嗗啓鍏ヤ互涓嬭缃€?/p>


{

  ...,

+ "volta": {

+  "node": "14.17.3",

+  "npm": "6.14.13" //or "yarn": "1.19.2"

+ }

}

閫氳繃涓庢偍鐨勫洟闃熷叡浜package.json鍐呭锛屼緥濡傚湪 GitHub 涓婏紝姣忎釜浜洪兘鍙互浣跨敤鐩稿悓鐗堟湰鐨?Node 鎴?npm銆?/p>

渚嬪锛屽亣璁炬偍鍦?code>package.json涓€涓」鐩腑杩愯浜嗕笂杩拌缃€傚鏋?npm 鐨勭増鏈紦瀛樺湪 鏈湴鏈哄櫒涓婏紝灏嗘樉绀恒€?濡傛灉瀹冩病鏈夌紦瀛樺湪鏈湴鏈哄櫒涓婏紝瀹冨皢浠庡畨瑁呭紑濮嬶紝骞跺湪瀹夎瀹屾垚鏃舵樉绀恒€?code>npm -v

6.14.13``6.14.13

6.14.13``6.14.13

杩欐牱锛屽鏋滀綘鏈湴鏈夐偅涓増鏈紝瀹冧細鑷姩鍒囨崲鍒伴偅涓増鏈紝鍚﹀垯瀹冧細浠庣増鏈畨瑁呭紑濮嬨€?/p>

杩欏緢鏂逛究锛岃€屼笖npm install鍗充娇浣犺繍琛屽畠鑰屼笉鐢ㄦ媴蹇冪増鏈紝鐗堟湰涔熶細鑷姩瀵归綈锛屾墍浠?code>package-lock.json涓嶄細鏈変换浣曞樊寮傘€傦紙npm 6绯诲拰7绯?code>package-lock.json鐨勫唴瀹瑰緢涓嶄竴鏍枫€傦級

volta list

volta list璇ュ懡浠ゆ鏌ュ苟鏄剧ず鍖呭惈宸插畨瑁?Node 杩愯鏃躲€佸寘绠$悊鍣ㄥ拰浜岃繘鍒舵枃浠剁殑鍖呫€?/p>

濡備綍浣跨敤volta list [FLAGS] [OPTIONS] [tool]銆?/p>

volta list璇ュ懡浠ょ殑鐢ㄦ硶鎬荤粨濡備笅銆?/p>


# 浣跨敤鏂规硶

volta list [FLAGS] [OPTIONS] [tool]

# Flags

-c, --current # 鏄剧ず褰撳墠娲诲姩宸ュ叿

              # 姝ゆ爣蹇椾负缂虹渷璁剧疆

-d, --default # 鏄剧ず榛樿宸ュ叿

    --verbose # 鍚敤楂樼骇璇婃柇

    --quiet  # 闃叉涓嶅繀瑕佺殑鏄剧ず

-h, --help    # 鏄剧ず甯姪淇℃伅

# OPTIONS

--format <format>  # 鎸囧畾杈撳嚭鏍煎紡

                    # 鏈夋晥鍊间负`human`or`plain`

                    # 榛樿鍊间负`human`锛屽惁鍒欎负`plain`



# ARGS

<tool>  # 鎸囧畾瑕佸垪鍑虹殑宸ュ叿锛坣ode锛宯pm锛寉arn鎴栧叾浠栦簩杩涘埗鏂囦欢锛?

        # 鎸囧畾all浠ユ樉绀烘墍鏈夊唴瀹?

volta list鎮ㄥ彲浠ユ煡鐪嬭椤圭洰涓娇鐢ㄧ殑宸ュ叿鐨勭増鏈€?/p>

volta list all鐜板湪鎮ㄥ彲浠ョ湅鍒?Volta 绠$悊鐨勫伐鍏峰垪琛ㄣ€?/p>

馃挰姒傛嫭

鍐欎簡杩欎箞闀跨殑涓€鍙ヨ瘽锛屽笇鏈涘ぇ瀹惰兘鏄庣櫧Volta鐨勯瓍鍔涖€?/p>

鎴戣涓鸿繖瀵逛簬涓昏寮€鍙?JavaScript 鐨勪汉鏉ヨ鏄渶濂界殑瑙e喅鏂规銆?/p>

鎴戜滑鐩镐俊鎮ㄤ娇鐢?Volta 鐨勪汉瓒婂锛屾偍灏辫秺鑳戒韩鍙楀埌瀹冪殑濂藉锛屾墍浠ヨ鑰冭檻灏嗗畠浠嬬粛缁欐偍鐨勫紑鍙戝洟闃熴€?/p>

馃檹鎰熻阿鎮ㄩ槄璇诲埌鏈€鍚庛€傚啀瑙併€?/p>


https://www.xamrdz.com/backend/3n61945730.html

相关文章: