Linux or Mac
./SignallingWebServer/platform_scripts/bash/start.sh
进入目录:
cd ./PixelStreamingInfrastructure\SignallingWebServer
sudo apt install npm
然后执行:
If you want to work on a specific library within this monorepo then cd into that directory and run:
npm install
npm run build
If you want to install all the dependencies and flush any existing node_modules, go to the root of the repo and run:
npm install
报错:
bash
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'commander@12.1.0',
npm WARN EBADENGINE required: { node: '>=18' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'webpack-dev-middleware@7.4.2',
npm WARN EBADENGINE required: { node: '>= 18.12.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'webpack-dev-server@5.2.1',
npm WARN EBADENGINE required: { node: '>= 18.12.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'webpack-merge@6.0.1',
npm WARN EBADENGINE required: { node: '>=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'yaml@2.7.1',
npm WARN EBADENGINE required: { node: '>= 14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'commander@12.1.0',
npm WARN EBADENGINE required: { node: '>=18' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@epicgames-ps/mediasoup-sdp-bridge@1.0.6',
npm WARN EBADENGINE required: { node: '>=16.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm ERR! Cannot convert undefined or null to object
npm ERR! A complete log of this run can be found in:
npm ERR! /home/chajing/.npm/_logs/2026-02-13T12_38_17_988Z-debug-0.log
解决方法:
方式一(推荐):用 nvm 管理 Node
1️⃣ 安装 nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
然后:
source ~/.bashrc
2️⃣ 安装 Node 20
nvm install 20 nvm use 20 nvm alias default 20
3️⃣ 确认版本
node -v
应该看到:
v20.x.x
bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
然后安装:
nvm install 20