bhaskar das
bhaskar das

Reputation: 195

Karma running issue :Cannot read property 'prototype' of undefined

I have installed Karma in my system and when I am running the script I am getting the issue.

C:\angularjs1-master\Ch 02\sp-blogger\scripts>test.bat
C:\angularjs1-master\Ch 02\sp-blogger\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.<anonymous> (C:\angularjs1-master\Ch 02\sp-blogger\node_modules\policyfile\lib\server.js:254:34)

Could not understand the error here. Kindly let me know if any dependency needs to be added or I need to do anything else.

Upvotes: 2

Views: 1219

Answers (1)

bzzhuh
bzzhuh

Reputation: 351

So we couldn't upgrade the component that was using this and we had to downgrade our version of NodeJS to get these old legacy tests to run.

EventEmitter.prototype was removed in Node version 7 or 8 I think. We went back to 6 and it worked.

Upvotes: 2

Related Questions