Tabbas, zan iya yin hakan. Anan ga daftarin tsari:
Node.js buษaษษen tushe ne, yanayin lokaci na lokaci na JavaScript na dandamali wanda ke ba masu haษaka damar ฦirฦirar kowane nau'ikan kayan aikin uwar garken da aikace-aikace a cikin JavaScript. ฦaukaka Node.js na iya zama mahimmanci, musamman ta fuskar tsaro. Hakanan yana da mahimmanci don tashi cikin sauri tare da sabbin abubuwa da haษakawa waษanda ke zuwa tare da kowane sabuntawa. Don magance wannan sabuntawar batu, za mu iya amfani da umarnin sabunta kumburi. A ฦasa akwai mafita ga wannan yanayin.
Domin sabunta NodeJS, zaku iya amfani da ** Node Version Manager (NVM)**. NVM kayan aiki ne na layin umarni da aka gina musamman don sarrafa nau'ikan Node.js masu aiki da yawa.
// Installs the latest version nvm install node // Use the latest version nvm use node //To reinstall packages from previous version nvm reinstall-packages v.13.9.1
ฦa'idar Aiki na Manajan Sigar Node (NVM)
NVM yana aiki akan kowane harsashi mai dacewa da POSIX, kodayake yana buฦatar tweak bayanin martabar harsashi don yin aiki daidai. Yana ba masu haษaka damar shigar da nau'ikan Node.js da yawa, suna zayyana/canzawa tsakanin su cikin sauฦi.
NVM yana neman rage wahalhalun da ke tattare da sarrafawa da daidaita nau'ikan Node.js tare da manufar haษakawa, gwaji, da jin daษin shirye-shiryen JavaScript masu rikitarwa.
Lambar da aka jera a sama tana nuna amfani da NVM, farawa ta hanyar shigar da sabuwar sigar kumburin da aka samu sannan kunna ta don amfani. Idan akwai wasu fakiti da aka shigar a ฦarฦashin sigar baya da kuke buฦatar kiyayewa, umarni na uku yana ba ku damar sake shigar da waษannan fakitin.
Binciken npm (Mai sarrafa fakitin Node)
**npm** (Node Package Manager) shine babban manajan fakiti na Node.js. A matsayin wani ษangare na kowane shigarwa na Node.js, npm yana taimakawa a cikin shigarwa na kunshin, sarrafa nau'i, da sarrafa dogara, waษanda ke da mahimmanci a ci gaban yanar gizo na zamani.
Fayil na **package.json** a cikin kundin adireshin aikace-aikacen ku yana zayyana duk abin dogaro na aikin ku. Kuna iya ฦara fakiti azaman abin dogaro ta amfani da umarnin 'npm install
Wani al'amari mai ban sha'awa na npm shine babban ma'ajiyar kayan aikin JavaScript da ikon sarrafa nau'ikan lambobi da yawa da abubuwan dogaro na lamba, wanda ke sauฦaฦawa ga masu haษakawa dangane da haษin gwiwa da turawa.
Don haka, a cikin mahallin Node.js, sabunta tsarin ku tare da NVM da fahimtar yadda ake amfani da npm da kyau zai iya taimaka muku ฦirฦira, kiyayewa, da tura aikace-aikacen JavaScript ษinku ta ingantacciyar hanya, mai iya sarrafawa.