I am running the LTS latest Node JS version 8.9.3. I also installed the latest karma and jasmine libraries for unit and e2e testing, but I am getting this error when I run the test.bat file at the command line. It does not open the browser to show the testing environment. I even updated socket.io. However, If I install an older version of Node.JS (6.11.1). I don't get any error messages, the chrome browser opens with the testing environment, and the unit tests run fine. Here is the error message with Node.Js 8.9.3 running: EventEmmiter in server.js is null. What do I have to do to fix this with the latest Node.js version? Thanks.
Error occurs at Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){ at EventEmitter.prototype in the server.js file which is located in the policyfile\lib folder in the node_modules folder.
TypeError: Cannot read property 'prototype' of undefined
at Object. (C:\Users\Yanni\Desktop\angular-seed\node_modules\policyfile\lib\server.js:254:34)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (C:\Users\Yanni\Desktop\angular-seed\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\Yanni\Desktop\angular-seed\node_modules\policyfile\index.js:1:80)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (C:\Users\Yanni\Desktop\angular-seed\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at create (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\transports\flashsocket.js:62:14)
at Function.FlashSocket.init (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\transports\flashsocket.js:127:5)
at new Manager (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\manager.js:137:23)
at Object.exports.listen (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\socket.io.js:78:10)
at createSocketIoServer (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\lib\server.js:160:19)
at Array.invoke (C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:75:15)
at get (C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:48:43)
at C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:71:14
at Array.map ()
at Injector.invoke (C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:70:31)
at Object.exports.start (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\lib\server.js:206:12)
at karmaCliRun (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:23:54)
at requireCliAndRun (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:46:7)
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:54:12
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:45:21
at ondir (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:196:27)
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:163:39
at onex (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:104:32)
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:24:24
at FSReqWrap.oncomplete (fs.js:153:5)`
I am running the LTS latest Node JS version 8.9.3. I also installed the latest karma and jasmine libraries for unit and e2e testing, but I am getting this error when I run the test.bat file at the command line. It does not open the browser to show the testing environment. I even updated socket.io. However, If I install an older version of Node.JS (6.11.1). I don't get any error messages, the chrome browser opens with the testing environment, and the unit tests run fine. Here is the error message with Node.Js 8.9.3 running: EventEmmiter in server.js is null. What do I have to do to fix this with the latest Node.js version? Thanks.
Error occurs at
Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){
atEventEmitter.prototype
in the server.js file which is located in the policyfile\lib folder in the node_modules folder.`C:\Users\Yanni\Desktop\angular-seed\scripts>test.bat C:\Users\Yanni\Desktop\angular-seed\node_modules\policyfile\lib\server.js:254 Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){ ^
TypeError: Cannot read property 'prototype' of undefined at Object. (C:\Users\Yanni\Desktop\angular-seed\node_modules\policyfile\lib\server.js:254:34)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (C:\Users\Yanni\Desktop\angular-seed\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\Yanni\Desktop\angular-seed\node_modules\policyfile\index.js:1:80)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (C:\Users\Yanni\Desktop\angular-seed\node_modules\coffee-script\lib\coffee-script\coffee-script.js:211:36)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at create (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\transports\flashsocket.js:62:14)
at Function.FlashSocket.init (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\transports\flashsocket.js:127:5)
at new Manager (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\manager.js:137:23)
at Object.exports.listen (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\node_modules\socket.io\lib\socket.io.js:78:10)
at createSocketIoServer (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\lib\server.js:160:19)
at Array.invoke (C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:75:15)
at get (C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:48:43)
at C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:71:14
at Array.map ()
at Injector.invoke (C:\Users\Yanni\Desktop\angular-seed\node_modules\di\lib\injector.js:70:31)
at Object.exports.start (C:\Users\Yanni\Desktop\angular-seed\node_modules\karma\lib\server.js:206:12)
at karmaCliRun (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:23:54)
at requireCliAndRun (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:46:7)
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:54:12
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:45:21
at ondir (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:196:27)
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:163:39
at onex (C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:104:32)
at C:\Users\Yanni\AppData\Roaming\npm\node_modules\karma-cli\node_modules\resolve\lib\async.js:24:24
at FSReqWrap.oncomplete (fs.js:153:5)`