a.拿到安装包
b.安装npm和node:
apt install nodejs-legacy
apt install npm
c.安装vue-cli
npm install -g vue-cli
查看版本vue -V
d.升级最新版本node
npm install n -g
n stable
更新完成之后使用exit命令退出重登
e.安装项目依赖项
在项目跟目录使用:
npm install -production
npm i @nuxtjs/axios -S
f.启动项目:
npm start
g.安装pm2进行后台启动
如果报错:Installing ERROR | Unexpected end of JSON input while parsing near ' : '
npm cache clean --force
npm install pm2 -g
h.启动pm2(在项目根目录)
pm2 start ./node_modules/nuxt/bin/nuxt.js -- start