版本
Ubuntu 22.04
nvm 0.39.3
node.js 14 LTS
nvm安装
1、预备工作
sudo apt-get update
sudo apt-get install build-essential libssl-dev
2、下载nvm(用的魔法 + 第二种方式)
#方法一
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
#方法二
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
3、nvm换源
#在 ~/.bashrc 中添加下列语句
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
node.js 安装
1、版本卸载install后面,可以只写大版本号,自动匹配大版本下面最新的小版本。测试11不行、14可以。npm跟着nodejs的版本适配
nvm install 14
2、npm换源
#更换npm源为淘宝的源
npm config set registry https://registry.npm.taobao.org
#检查是否配置成功
npm config get registry
webviz安装
1、项目下载到本地
git clone https://github.com/cruise-automation/webviz.git
cd webviz/
2、安装依赖
npm run bootstrap
3、编译项目
npm run build
装依赖和编译的过程中会遇到过时的问题,不过按这个版本装没有遇到错误。
4、跑demo
三个语句对应三个脚本,目前还没整明白每个都是啥
npm run webviz-dev
npm run docs-dev
npm run storybook
更多脚本在webviz 的github上有
https://github.com/cruise-automation/webviz