安裝環境依賴
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