Linux
#Download wget https://nodejs.org/dist/v14.15.3/node-v14.15.3-linux-x64.tar.xz #Decompress tar xf node-v14.15.3-linux-x64.tar.xz #Enter directory cd node-v14.15.3-linux-x64 #Establish soft connection and take effect globally ln -s /root/node-v14.15.3-linux-x64/bin/npm /usr/local/bin/npm ln -s /root/node-v14.15.3-linux-x64/bin/node /usr/local/bin/node Node - v # version query Npm - v # version query Which npm # where is npm npm installation directory
#Installation npm install -g yarn #Create a soft link. It takes effect globally ln -s /root/node-v14.15.3-linux-x64/bin/yarn /usr/local/bin/ #Version Query yarn -v #Installation position which yarn # whereis yarn
#Install either. npm or yarn npm install -g pm2 yarn global add pm2 ##If you do not know where the installation location is, you can see the installation process #Create a soft link. It takes effect globally ln -s /root/node-v14.15.3-linux-x64/bin/pm2 /usr/local/bin/ #Version Query pm2 -v #Installation position which pm2 # whereis pm2 #Start process pm2 start server.js #View process pm2 list
Windows
Node.js
node -v View node version npm -v View npm version npm install -g npm Npm update
Vue scaffold
npm install -g @vue/cli # or yarn global add @vue/cli
-
Question 1
npm config get registry
npm config set registry https://registry.npm.taobao.org
-
Question 2
npm WARN deprecated vue-cli@2.9.6 : This package has been deprecated in favour of @vue/cli npm WARN deprecated request@2.88.2 : request has been..... ... or other errors, see the reason
Clear Cache npm cache clean --force Uninstall older versions npm uninstall -g @vue/cli # or yarn global remove vue-cli
npm update -g @vue/cli # or yarn global upgrade --latest @vue/cli
vue -V # or vue --version
C:\***\node_global\
yarn
npm install -g yarn
yarn -v