sealcode / sealious

An extensible, declarative node framework
25 stars 2 forks source link

`Cannot read property 'prototype' of undefined` while testing `me-subject.js` #273

Closed adwydman closed 8 years ago

adwydman commented 8 years ago

I'm on references branch and I try to test subject/predefined-subjects/me-subject.js. What I get is an error:

$ npm test

> sealious@0.7.11 test C:\Users\anwi\Desktop\sealious
> mocha --recursive tests

C:\Users\anwi\Desktop\sealious\lib\subject\predefined-subjects\me-subject.js:12
MeSubject.prototype = Object.create(Sealious.Subject.prototype);
                                                    ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (C:\Users\anwi\Desktop\sealious\lib\subject\predefined-subjects\me-subject.js:12:53)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at Object.<anonymous> (C:\Users\anwi\Desktop\sealious\tests\unit-tests\subject\prefedined-subjects\me-subject.test.js:1:94)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at C:\Users\anwi\Desktop\sealious\node_modules\mocha\lib\mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (C:\Users\anwi\Desktop\sealious\node_modules\mocha\lib\mocha.js:217:14)
    at Mocha.run (C:\Users\anwi\Desktop\sealious\node_modules\mocha\lib\mocha.js:469:10)
    at Object.<anonymous> (C:\Users\anwi\Desktop\sealious\node_modules\mocha\bin\_mocha:404:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.runMain (module.js:575:10)
    at run (node.js:348:7)
    at startup (node.js:140:9)
    at node.js:463:3
npm ERR! Test failed.  See above for more details.
kuba-orlik commented 8 years ago

It's probably an issue with circular dependency. Have you tried running it on a different version of node?

There has been a certain change to how Node handles circular dependencies, but I cannot put my finger on it...

adwydman commented 8 years ago

I'll try it and let you know.

adwydman commented 8 years ago

Thanks to locreq the problem is solved. Closed.