First open the official website of yarm. https://www.yarnpkg.com/zh-Hant/
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main"| sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
yarn config set registry https://registry.npm.taobao.org
npm install vue-cli pm2 -g
Here to talk about it, once the js running through the node command is closed or unexpectedly ended, we cannot continue to access it. So we need to increase stability through pm2.
pm2 start server.js
The rendering after successful operation is as follows:
If you are successful here, you don't need to read down. If the installation of pm2 fails, continue to read down.
Before, I kept making errors when configuring the environment on ubuntu14.04, and finally I came up with a set of commands, which can be installed normally. You can test it yourself.
sudo apt remove cmdtest
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main"| sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
yarn config set registry https://registry.npm.taobao.org
1 apt-get update
2 apt-get install apt-transport-https
3 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -4 echo "deb https://dl.yarnpkg.com/debian/ stable main"| tee /etc/apt/sources.list.d/yarn.list
5 apt-get update
6 apt-get install yarn
7 npm cache clean --force
8 npm install -g ionic cordova
9 npm install vue-cli pm2 -g
Finally, record the following commonly used pm commands:
Recommended Posts