wowserhq / wowser

World of Warcraft in the browser using JavaScript and WebGL
MIT License
238 stars 63 forks source link

Proxy on windows doesn't work #168

Open Yehonal opened 7 years ago

Yehonal commented 7 years ago

This error happens on windows with proxy command

i've installed all dependencies and using latest nodejs version

npm run proxy 3724 '192.168.1.2:3724'

> wowser@0.0.1 proxy C:\Hw2_Hybrid\usr\workspace\emu-wow\wowser
> websockify "3724" "'192.168.1.2:3724'"

C:\Hw2_Hybrid\usr\workspace\emu-wow\wowser\node_modules\policyfile\lib\server.js:253
Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){
                                ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (C:\Hw2_Hybrid\usr\workspace\emu-wow\wowser\node_modules\policyfile\lib\server.js:253:33)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Hw2_Hybrid\usr\workspace\emu-wow\wowser\node_modules\policyfile\index.js:1:80)
    at Module._compile (module.js:571:32)
timkurvers commented 7 years ago

According to this issue it's due to policyfile using process.EventEmitter, which has been removed in Node 7. Using Node 6 should work.

This is not wowser-specific, but is probably something we should document for the time being.

Yehonal commented 7 years ago

Well maybe in requirements :) thanks anyway!