node.js - 搭建AppRTC服务器

标签 node.js npm webrtc apprtc

那里。 我在构建 https://github.com/webrtc/samples 时遇到困难在赢8.1中。 我正在尝试安装 npm 依赖项。 但有一些错误,如下所示。 Node.js 版本是 v4.2.3,npm 版本是 v2.14.7

D:\_Temp\AppRTC\samples>npm install

> travis-multirunner@3.0.0 postinstall D:\_Temp\AppRTC\samples\node_modules\trav
is-multirunner
> ./bin/travis-sync

'.' is not recognized as an internal or external command,
operable program or batch file.

> chromedriver@2.20.0 install D:\_Temp\AppRTC\samples\node_modules\chromedriver
> node install.js

Downloading http://chromedriver.storage.googleapis.com/2.20/chromedriver_win32.z
ip
Saving to C:\Users\JIS\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
Receiving...
Received 782K...
Received 1564K...
Received 2346K...
Received 2398K total.
Extracting zip contents
Copying to target path D:\_Temp\AppRTC\samples\node_modules\chromedriver\lib\chr
omedriver
Done. ChromeDriver binary available at D:\_Temp\AppRTC\samples\node_modules\chro
medriver\lib\chromedriver\chromedriver.exe

> utf-8-validate@1.2.1 install D:\_Temp\AppRTC\samples\node_modules\selenium-web
driver\node_modules\ws\node_modules\utf-8-validate
> node-gyp rebuild


D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws\node_mod
ules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\n
odejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gy
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  validation.cc
  win_delay_load_hook.c
     Creating library D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\n
  ode_modules\ws\node_modules\utf-8-validate\build\Release\validation.lib and o
  bject D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws
  \node_modules\utf-8-validate\build\Release\validation.exp
  Generating code
  Finished generating code
  validation.vcxproj -> D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver
  \node_modules\ws\node_modules\utf-8-validate\build\Release\\validation.node

> bufferutil@1.2.1 install D:\_Temp\AppRTC\samples\node_modules\selenium-webdriv
er\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild


D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws\node_mod
ules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodej
s\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js
" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  bufferutil.cc
  win_delay_load_hook.c
     Creating library D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\n
  ode_modules\ws\node_modules\bufferutil\build\Release\bufferutil.lib and objec
  t D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver\node_modules\ws\nod
  e_modules\bufferutil\build\Release\bufferutil.exp
  Generating code
  Finished generating code
  bufferutil.vcxproj -> D:\_Temp\AppRTC\samples\node_modules\selenium-webdriver
  \node_modules\ws\node_modules\bufferutil\build\Release\\bufferutil.node
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.2.3
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! travis-multirunner@3.0.0 postinstall: `./bin/travis-sync`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the travis-multirunner@3.0.0 postinstall script './bin/travis
-sync'.
npm ERR! This is most likely a problem with the travis-multirunner package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./bin/travis-sync
npm ERR! You can get their info via:
npm ERR!     npm owner ls travis-multirunner
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\_Temp\AppRTC\samples\npm-debug.log

D:\_Temp\AppRTC\samples>node test/server.js
D:\_Temp\AppRTC\samples\test\server.js:18
    key: keys.serviceKey,
             ^

TypeError: Cannot read property 'serviceKey' of undefined
    at D:\_Temp\AppRTC\samples\test\server.js:18:14
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:246:24
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:150:24
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:71:20
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:951:20
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:930:13
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:829:20
    at D:\_Temp\AppRTC\samples\node_modules\pem\lib\pem.js:999:20
    at F (D:\_Temp\AppRTC\samples\node_modules\pem\node_modules\which\which.js:7
3:25)
    at E (D:\_Temp\AppRTC\samples\node_modules\pem\node_modules\which\which.js:7
6:29)

感谢您的回复。

最佳答案

使用 Virtualbox 设置虚拟机非常容易。

事实上,我在家里的游戏电脑上就是这么做的,只是在 Virtualbox VM 中安装了最新的 Debian、node.js、Sublime,然后我使用 Virtualbox 无缝模式,将 VM 中的 Windows 置于主机操作系统桌面之上。

效果很好!

关于node.js - 搭建AppRTC服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34187702/

相关文章:

node.js - 安装塔式模块时出现问题 - ws 模块崩溃

linux - 为什么 node.js+mongodb 不为每秒发送 100 个请求提供 100 个请求/秒的吞吐量?

mysql - Node.JS MySQL 回调

javascript - Gulp Browserify 在每次保存/更改时需要更长的时间来编译

compression - 具有 gzip 压缩的 WebRTC 数据通道

node.js - 无法识别 Node

npm 安装不起作用 | npm 错误!路径 | npm 错误!代码 | npm 错误!错误 | npm 错误!系统调用 | npm 错误!恩恩特

node.js - 将参数注入(inject) npm 脚本命令

webrtc - 如何将 webRTC 内容提供商连接到 Janus-Gateway 流媒体插件

javascript - RTCDataChannel 发送方法不发送数据