An warware: umarnin sabunta node

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 '. Hakazalika, don share fakitin, zaku iya amfani da 'npm uninstall '.

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.

Shafi posts:

Leave a Comment