scramjetorg / scramjet

Public tracker for Scramjet Cloud Platform, a platform that bring data from many environments together.
https://www.scramjet.org
MIT License
253 stars 20 forks source link

Accessing non-existent property 'WindowStream' of module exports inside circular dependency #85

Closed maxharlow closed 4 years ago

maxharlow commented 4 years ago

I get this warning message every time Scramjet is imported? Seems to run ok however.

To reproduce..

test.js:

const Scramjet = require('scramjet')
$ node --trace-warnings test
(node:21638) Warning: Accessing non-existent property 'WindowStream' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
    at Object.get (internal/modules/cjs/loader.js:837:5)
    at Object.<anonymous> (/Users/max/test/node_modules/scramjet/lib/data-stream.js:1:72)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Module.require (internal/modules/cjs/loader.js:1089:19)
    at require (internal/modules/cjs/helpers.js:73:18)
    at Object.<anonymous> (/Users/max/test/node_modules/scramjet/lib/index.js:15:17)

I'm using Scramjet v4.30.2 with Node v14.3.0 on MacOS v10.14.6.

MichalCz commented 4 years ago

Yes, the circular dependency is for purpose there and taken into account, but I guess, since new mjs modules work in a different way this won't be possible to use anymore.

I've taken some time off now to try to push for Scramjet v5.0.0 again so this will be solved also there, but for now, we need to park it unless you have some ideas (PR welcome).

MichalCz commented 4 years ago

I'll be solving this in Scramjet v5.0

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

MichalCz commented 4 years ago

Nope, patch underway after all... :)

MichalCz commented 4 years ago

@maxharlow v4.34.5 should solve the issue - can you confirm it and close the issue if so?

maxharlow commented 4 years ago

@MichalCz That works great, thank you