An warware: yadda ake canza sigar npm ta

Canza sigar npm ษ—inku wani muhimmin sashi ne na kiyaye yanayin ci gaba mai santsi, mara bug. Npm, ko Node Package Manager, shine mai sarrafa fakitin buษ—e ido don JavaScript. Kayan aiki ne da masu haษ“akawa a duk duniya ke amfani da shi don rabawa da aro fakitin lamba. Ko kuna buฦ™atar haษ“aka zuwa sabon sigar ko rage darajar zuwa tsohon, sanin yadda ake sarrafa sigar npm shine maษ“alli. Wannan gaskiya ne musamman idan kuna aiki akan ayyuka da yawa tare da nau'ikan kumburi daban-daban.

Yanzu, bari mu shiga cikin tsarin da ya kamata a bi don cimma wannan.

Sanya Manajan Sigar Node (NVM)

A kan hanyar canza sigar npm, da farko muna buฦ™atar shigar da NVM. NVM yana ba ku damar shigarwa da sarrafa nau'ikan Node.js da npm da yawa.

 
//You can install NVM by using the install script using cURL:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash 

// Or using Wget if you prefer:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash 

Shigar da takamaiman Sigar Node.js da npm

Bayan shigar da NVM cikin nasara, zaku iya shigar da takamaiman sigar Node.js da npm.

//To install a version use the nvm install command followed by the version number:
nvm install 10.16.0 
  • Don amfani da sigar da aka shigar, gudanar da umarnin amfani da nvm sannan lambar sigar ta biyo baya.
  • Da zarar an gama, zaku iya duba sigar node da npm da aka shigar ta amfani da node -v da npm -v umarni.

Ana ษ—aukaka npm

Don sabunta npm, kuna iya amfani da npm shigar npm@last -g don tabbatar da cewa an tsara dukkan nodes zuwa juna ba tare da matsala ba. Aiwatar da wannan zai tabbatar da sadarwa tsakanin juzu'i daban-daban, rike da m kwarara.

 
npm install npm@latest -g 

Bayan bin waษ—annan matakan, yakamata a sabunta npm ษ—inku zuwa sigar da ake buฦ™ata. Yi Magana ta juyawa tsakanin sigogin, kamar yadda yake a sau da yawa bukata a cikin ayyukanmu da yawa, duniyar da ta gabata.

Ka tuna don ci gaba da sabuntawa, yayin da ake fitar da sabbin sigogi akai-akai, suna alfahari da ingantattun fasaloli, haษ“aka aiki da ฦ™ananan kwari. Fahimtar waษ—annan ฦ™ananan abubuwan fasaha yana da mahimmanci don zama ฦ™wararren mai haษ“akawa.

Shafi posts:

Leave a Comment