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 don't see any test.bat file or scripts/ directory. Make sure you are using the correct link and maybe try to find a support forum specific to the book you are reading.
I am reading an angular js (copyright 2014) book and the seed project download link in the book is the following:
https://github.com/angular/angular-seed/tree/69c9416c8407fd5806aab3c63916dfcf0522ecbc
but the current repo seems to be this:
https://github.com/angular/angular-seed
is this an updated repo?
With the https://github.com/angular/angular-seed/tree/69c9416c8407fd5806aab3c63916dfcf0522ecbc repo there is a folder called "scripts" which contains a test.bat file and when I run it it outputs the following error: what do I have to do to fix the problem? Thanks:
`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)`