Webviz本地构建

安装环境依赖

sudo apt-get update
sudo apt-get install build-essential libssl-dev

安装Node版本管理工具NVM

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

更换源为淘宝镜像

//临时
NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
//永久
#在 ~/.bashrc 中添加下列语句
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node

安装Nodejs

nvm install 12.22
nvm use 12.22
nvm current

替换npm源为淘宝镜像

npm config set registry https://registry.npm.taobao.org
npm config set puppeteer_download_host=https://npm.taobao.org/mirrors

构建前端项目

手动修改了webviz-core的package中react-autocomplete版本为1.8.1

建议先手动安装node-sass

npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
npm install node-sass

执行脚本安装项目依赖

npm run bootstrap
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章