1、安装nodejs
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs build-essential
2、安装与配置虚拟nodejs环境
apt install python3-venv python3
python3 -m venv pyenv
source pyenv/bin/activate
pip install nodeenv
nodeenv nodeenv --node=22.18.0
source nodeenv/bin/activate

如果出现上图的效果,说明python与nodejs的虚拟环境已经创建完成。
3、编译browser
npm install -g yarn
cd ...
yarn install 或 npm install