Ubuntu server 20.04安装Ant Design Pro

自己写的笔记,非转载,自己做个记录用。

1、全新系统

2、升级apt

sudo apt update
sudo apt upgrade

3、在根目录下创建lmkjsite文件夹(文件夹名可自取),并从Git里下载项目文件

git clone --depth=1 https://github.com/ant-design/ant-design-pro.git lmkjsite

4、更新资源库路径,下载并执行 NodeSource 安装脚本,脚本的文件夹是/tmp/nodesource_setup.sh

curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodesource_setup.sh

5、运行安装脚本
 

sudo bash /tmp/nodesource_setup.sh

6、安装Nodejs

sudo apt install nodejs

7、查看安装的node版本

node -v

8、进入项目文件夹下

cd lmkjsite

9、安装项目依赖项

npm install

10、安装过程中出现很多警告的解决方法

npm audit fix
npm audit fix --force
npm audit

11、运行项目

npm start

通过http://localhost:8000或者http://IP地址:8000访问

猜你喜欢

转载自blog.csdn.net/ynstxx/article/details/124933834