前端运行项目

1.安装 node

https://github.com/nodesource/distributions/blob/master/README.md

2.安装 yarn

https://yarnpkg.com/lang/en/docs/install/#debian-stable

如果安装时没有源,

cd /etc/apt/sources.list.d/
sudo rm -rf coolwanglu-ubuntu-pdf2htmlex-xenial.list yarn.list

3.进入前端根目录

yarn install

yarn serve

根据终端提示在浏览器输入对应 url 查看效果

前端运行之前先配置前端目录下的 环境值

在root环境下操作
3、 apt remove nodejs
65 apt install nodejs-legacy
66 node -v
67 nodejs -v
68 npm -v
69 apt install npm
70 npm -v
71 node -v
72 npm install -g n
73 n stable
74 node -v
75 npm -v

猜你喜欢

转载自blog.csdn.net/weixin_43883907/article/details/85760361